Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355259

Summary: Cannot declare role-typed field in an enum-as-team-member
Product: [Tools] Objectteams Reporter: Stephan Herrmann <stephan.herrmann>
Component: OTJAssignee: Stephan Herrmann <stephan.herrmann>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 2.0   
Target Milestone: 2.1 M5   
Hardware: Other   
OS: Linux   
Whiteboard:

Description Stephan Herrmann CLA 2011-08-19 15:07:48 EDT
1) A enum in a team cannot be passed to the outside, client is flagged with
   Missing anchor (team instance) for role type bug348570.TeamClass.Aufzaehlung outside its team context (OTJLD 1.2.2(b)).
   Also declaring the type using extenalized role syntax doesn't help.

2) The following field inside an enum-as-team-member:
	public R r = new R();
   raises:
   Missing code implementation in the compiler
Comment 1 Stephan Herrmann CLA 2011-08-19 15:30:54 EDT
(In reply to comment #0)
> 1) A enum in a team cannot be passed to the outside, client is flagged with
>    Missing anchor (team instance) for role type bug348570.TeamClass.Aufzaehlung
> outside its team context (OTJLD 1.2.2(b)).
>    Also declaring the type using extenalized role syntax doesn't help.

This part is invalid: I was using 2.0.1RC1, in 2.1M1 it is fixed.

> 2) The following field inside an enum-as-team-member:
>     public R r = new R();
>    raises:
>    Missing code implementation in the compiler

This part is still relevant in 2.1M1
Comment 2 Stephan Herrmann CLA 2012-01-31 09:32:43 EST
Test & fix released via commit 1bad420ed4c295b8846e90c1f98215ddcae874aa

Note, that enums are static and thus an enum cannot directly refer to a role type.
Comment 3 Stephan Herrmann CLA 2012-09-22 16:25:26 EDT
Verified using build 2.2.0.201209221349