Summary: | [1.5][compiler] Generics, bound mismatch | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Heri <eclipse> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M4 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Heri
2004-11-06 21:10:16 EST
Generic method should also substitute according to their declaring class (if parameterized type). Added regression test: GenericTypeTest#test394. Fixed Compile without an error now. Verified in 200412140800 Eclipse 3.1 report bound mismatch on Enum_.java in Retrotranslator(http://retrotranslator.sourceforge.net/), but it can be compiled by SUN JDK. Following is a simplified version to reproduce the bug. public abstract class BoundMismatch<C extends BoundMismatch<C>> { public static <T extends BoundMismatch<T>> T getDefault(Class<T> clz){ return null; } public Object getDefault(){ return getDefault(getClass()); } } The present bug report describes another issue than the last added comment. If you still want it to be considered, then please open a separate bug for it. Entered bug 123078 since I investigated a fix in the meantime. |