Community
Participate
Working Groups
Build 3.3M3 The following program should be rejected on line "b.foo()". It currently is rejected instead the line "b.bar()". Problem comes from the fact type parameters are taking precedence over member types, which they shouldn't. interface IFoo { void foo(); } interface IBar { void bar(); } public class X<Bar extends IFoo> { class Bar implements IBar { public void bar(){} } void foo(Bar b) { b.foo(); // unbound (Bar is member type) b.bar(); // ok } }
Javac has same bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5060485
Added GenericTypeTest#test1086
Added GenericTypeTest#test1087-1089.
Fix consists in swapping Scope#getTypeOrPackage section for classscope lookup for type param and member type. Released for 3.3M4
Verified for 3.3M4 with I20061211-1119