| Summary: | [1.5][compiler] Inferred intersection type not enough specific | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | hwaite, Olivier_Thomann, philippe_mulet |
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
Inferred intersection type is: X&Comparable<?>, where it should be: X&Comparable<? extends X> Actually, it should be: X&Comparable<? extends X&Comparable<...>> Added GenericTypeTest#test0995 (disabled) Tim, pls have a look at it. *** Bug 272783 has been marked as a duplicate of this bug. *** This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Build 3.2RC4 The following program is rejected, though it shouldn't. Javac 1.5 also rejects it, Javac 1.6 accepts it. public class X { public class Inner { } void foo(boolean b, X1 x1, X2 x2) { Comparable<? extends X> x = b ? x1 : x2; (b ? x1 : x2).new Inner(); } } abstract class X1 extends X implements Comparable<X1> {} abstract class X2 extends X implements Comparable<X2> {}