Community
Participate
Working Groups
In the case an inner types is only used as a type arguments, the compiler doesn't provide the right inner class info for the corresponding entry. Look at bug 171184 comment 17. Since this is a spec issue, I think it should be fixed for 3.5.
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