Community
Participate
Working Groups
Build ID: I20070621-1340 Steps To Reproduce: Attempt to compile: public class EclipseInterfaceError { public static class A { public A method() { return this; } } public static class B extends A { public B method() { return this; } } public static interface Interface { public Interface getInterface(); public A getA(); } public static class Implementor implements Interface { public Implementor getInterface() { return this; } public B getA() { return new B(); } } } This compiles fine with javac but fails in eclipse. More information: Here's the details on this situation in the JLS: http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.4.5
What are your compiler settings? You set the compiler preferences to 5.0.
This compiles fine if the compiler's compliance level is set to 5.0
It looks more as an invalid bug than a worksforme...
Verified for 3.4M1 using build I20070802-0800.