Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355259 - Cannot declare role-typed field in an enum-as-team-member
Summary: Cannot declare role-typed field in an enum-as-team-member
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux
: P3 minor (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-19 15:07 EDT by Stephan Herrmann CLA
Modified: 2012-09-22 16:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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