Summary: | [compiler][1.5] Correct use of generic abstract classes give compiler error | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Thomas Barregren <thomas.barregren> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | gatesda, mikea, Olivier_Thomann, zorzella |
Version: | 3.1 | ||
Target Milestone: | 3.1 M5 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Thomas Barregren
2004-12-21 04:46:55 EST
This is a problem with how we write out array types of Type Variables. This case works fine if the 2 types are in the same source file: public abstract class AbstractTest<T> { abstract void array(T[] a); abstract void type(T a); } class Test<T> extends AbstractTest<T> { void array(T[] a) {} void type(T a) {} } But put Test in its own file & save it (picking AbstractTest up as a binary type), and it reports that the method array(T[]) does not override AbstractTest.array(Object[]). The binaryType for AbstractTest is seeing array(Object[]) and not array(T[]). The method's generic signature should be '([TT;)V' but its not set, so we pick it up as '([Ljava/lang/Object;)V' Indeed, we did not record the method as requiring a generic signature, due to array type. Same issue for field&method return types. Added GenericTypeTest#test455 *** Bug 82497 has been marked as a duplicate of this bug. *** *** Bug 82002 has been marked as a duplicate of this bug. *** *** Bug 79145 has been marked as a duplicate of this bug. *** Verified in I20040214 |