Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325397 - [compiler][generics] CCE in generic nested team
Summary: [compiler][generics] CCE in generic nested team
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.8 M4   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-15 17:27 EDT by Stephan Herrmann CLA
Modified: 2010-12-16 18:03 EST (History)
0 users

See Also:


Attachments
fix for the CCEs (1.62 KB, patch)
2010-09-16 11:59 EDT, Stephan Herrmann CLA
no flags Details | Diff
additional fix (4.67 KB, patch)
2010-12-11 11:45 EST, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2010-09-15 17:27:09 EDT
The following team causes grief in the compiler:

public team class TeamA121gnt1 {
	public team class Mid<A1> {
		protected class Inner<A> {}
	}
	public team class Mid2<A2> extends Mid<A2> {
	}
}

We get two CCEs and some incorrect errors/warnings.
Comment 1 Stephan Herrmann CLA 2010-09-16 11:59:13 EDT
Created attachment 179042 [details]
fix for the CCEs

This patch fixes the CCEs.

A full fix for the given testcase has to be deferred post 0.7.1,
since it will need significant changes for various combinations
of parameterized and weakened type bindings.
Comment 2 Stephan Herrmann CLA 2010-12-11 11:45:54 EST
Created attachment 185023 [details]
additional fix

Together with recent changes in bug 331877 this patch solves the issue:
 + don't let the MethodVerifier analyse those ifc-methods that are
   placeholders for non-public methods inherited from non-role super.
 + experimentally use the weak type in MethodVerifier.areEqualRoleTypes()
   which avoids incompatibility between two _OT$create$Confined methods.
Also:
 + don't report hiding of type parameters between class&ifc-part of 
   the same role
Comment 3 Stephan Herrmann CLA 2010-12-11 11:48:37 EST
Patch has been released for M4 as r1148 f.
Comment 4 Stephan Herrmann CLA 2010-12-16 15:42:14 EST
Verified for M4 using build 201012150343