Community
Participate
Working Groups
Class T1 and T2 is in seperate file. T2 can not compile in Eclipse. But this can be done in JBuilder or javac.. public class T1 { public void foo(int p1) { System.out.println("p1"); } public void foo(short p1) { System.out.println("p2"); } } public class T2 extends T1 { public void foo(long p1) { System.out.println("p3"); } public void testEc() { foo((short)1); } }
Reproduced in 3.0. We indeed incorrectly diagnose an ambiguity: The method foo(long) is ambiguous for the type T2 but it is a fair error to detect in 1.3 compliant mode. Only in 1.4 compliant and subsequent mode must we tolerate it. Kent - the compliance check must here use: options.complianceLevel.
Fixed. Added test075 to Compliance_13 & Compliance_14.
Verified for 3.0 M9 with build I200405190010.