Summary: | Error when parametrized type extending final type as return value. | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Mikael Nordenberg <mikael> |
Component: | Core | Assignee: | Kent Johnson <kent_johnson> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | CC: | mlists |
Version: | 3.1 | ||
Target Milestone: | 3.1.1 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Mikael Nordenberg
2005-06-21 10:18:24 EDT
The previous example shows the problem, but might be considered stupid, so here's another example that don't compile showing that it really is a serious bug: interface Factory<T> { <U extends T> U create(Class<U> c); } class BooleanFactory implements Factory<Boolean> { <U extends Boolean> U create(Class<U> c) { try { return c.newInstance(); } catch(Exception e) { return null; } } } Too late for considering it for 3.1. Will consider it for 3.1.1 as it has no obvious workaround. Added MethodVerify test070 Verified for 3.1.1 using M20050923-1430. |