Community
Participate
Working Groups
Build ID: M20080221-1800 Steps To Reproduce: Compiler error appears in eclipse with following test case. However, the class compiles fine with JDK 1.5.0_06 public class TestEclipseGenerics { public static abstract class SuperAbstract<Owner, Type> { public abstract Object foo(Type other); } public static abstract class HalfGenericSuper<Owner> extends SuperAbstract<Owner, String> { public abstract Object foo(String other); } public static abstract class AbstractImpl<Owner> extends HalfGenericSuper<Owner> { public Object foo(String other) { return null; } } public static class Concrete extends AbstractImpl { } } More information:
With HEAD, I got: ---------- 1. ERROR in D:\tests_sources\TestEclipseGenerics.java (at line 21) public static class Concrete extends AbstractImpl ^^^^^^^^ The type TestEclipseGenerics.Concrete must implement the inherited abstract method TestEclipseGenerics.SuperAbstract.foo(Object) ---------- 2. WARNING in D:\tests_sources\TestEclipseGenerics.java (at line 21) public static class Concrete extends AbstractImpl ^^^^^^^^^^^^ TestEclipseGenerics.AbstractImpl is a raw type. References to generic type TestEclipseGenerics.AbstractImpl<Owner> should be parameterized ---------- 2 problems (1 error, 1 warning) It compiles fine with JDK6 and 1.5.0_15.
Created attachment 100208 [details] Proposed patch with testcases
#doesMethodOverride(...) does not seem to check the return type any longer. So didn't we lose part of the logic with the patch ?
Created attachment 100266 [details] New proposed patch and testcases Passes all of our tests Added MethodVerifyTest 161-164 (the last 2 verify our behaviour with mismatched return types)
Released for 3.4RC1 Philippe - please add the +1
+1 for 3.4RC1
Waiting for new build availability for final verification. Hosting upon v_864 yields correct results.
Verified for 3.4 RC1 using build I20080515-2000.