Summary: | [1.5][compiler] Compiler error using generics with static class | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Divyanshu Sharma <divyanshu.sharma> | ||||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | critical | ||||||||
Priority: | P3 | CC: | Olivier_Thomann, philippe_mulet | ||||||
Version: | 3.3.2 | Flags: | philippe_mulet:
review+
|
||||||
Target Milestone: | 3.4 RC1 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Divyanshu Sharma
2008-04-15 13:13:52 EDT
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. |