Summary: | [1.5][compiler] Missing innerClass attribute for inner types used as type arguments | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | major | ||||||||||
Priority: | P3 | CC: | kent_johnson, mlists | ||||||||
Version: | 3.5 | Flags: | kent_johnson:
review+
|
||||||||
Target Milestone: | 3.5 RC1 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Olivier Thomann
2009-05-07 17:18:33 EDT
Targetting 3.5RC1 as this is a spec issue. Thanks for the quick response Olivier. It would be great to see this fixed for 3.5 indeed. Unless I am missing something obvious, the fix should be trivial. Created attachment 134991 [details]
First draft
Created attachment 135088 [details]
Proposed fix + regression tests
Kent, please review. Consider changing ContainsNestedTypes to ContainsNestedTypeReferences or HasNestedTypeReferences And could remove duplicate method in MethodBinding by forwarding to Util method, then checking to see if bit on method needs to be set Created attachment 135428 [details]
Proposed fix + regression tests
- Reorganized the code to share the set of visited types through the class file instance.
- Rename the tag bit field.
- Factorized the recording in the Util class only.
Kent, could you please do a quick review ?
Looks good. A small issues - the constructor for NestedTypeBinding sets the bit for all instances, so why do we need this test in WildcardBinding.resolve : if (resolveType.isNestedType() || ((resolveType.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) { instead of just : if ((resolveType.tagBits & TagBits.ContainsNestedTypeReferences) != 0) { Sure, I'll fix it. Released for 3.5RC1. Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.InnerEmulationTest_1_5. Verified for 3.5RC1 using I20090513-2000 |