Community
Participate
Working Groups
Build 20020314 The following code should compile clear, and currently is rejected by the compiler when toggled in 1.4 mode. [package p1; public class X extends AbstractY { public void init(){ super.init(); } public static void main(String[] arguments) { new X().init(); } } abstract class AbstractY extends AbstractZ implements I { public void init(int i){ System.out.println("SUCCESS"); } } abstract class AbstractZ implements I { public void init(){} } interface I { void init(); void init(int i); }]
This is due to the lookup algorithm for inserting interface methods. These get inserted before concrete methods, and thus the tie-breaking code gets into trouble. Should always add interface methods after superclass ones.
Fixed, regression test added.