Community
Participate
Working Groups
I20071113-0800 The following example shows that resolution of QualifiedAllocationExpression aborts to early and local type binding are not created. This is needed for bug 210070. import java.io.Serializable; public final class X implements Serializable { void bar() {} interface IM {} class SMember extends String {} @Annot(value = new SMember()) class Member extends X { ZorkMember z; void foo() { this.bar(); Zork1 z; } } @Annot(value = new X(){ ZorkAnonymous1 z; void foo() { this.bar(); Zork2 z; } }) void foo() { new X().new IM(); class Local extends X { ZorkLocal z; void foo() { this.bar(); Zork3 z; } } new X() { ZorkAnonymous2 z; void foo() { this.bar(); Zork4 z; } }; } } @interface Annot { String value(); }
Created attachment 83344 [details] Changes made by Philippe on my machine
Added InnerEmulationTest#test150 Added AnnotationTest#test242
In addition to still creating as much of a binding as we can, need to align inconsistent hierarchies for anonymous in similar way to other types. In particular, when extending final/enum, Object should be substituted etc... (which wasn't the case).
Created attachment 83429 [details] Proposed patch
Released for 3.4M4. Fixed
Verified for 3.4M4 using build I20071210-1800.