| Summary: | [1.5][compiler] Invalid 'Incompatible conditional operand types' error on instanceof | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Mark Hobson <hello> | ||||
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | Olivier_Thomann, srikanth_sankaran | ||||
| Version: | 3.5 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
Also affects casting too, using the above example: ListList<?> listList = (ListList<?>) list; Produces the error "Cannot cast from List<List<Integer>> to Main2.ListList<?>", although it compiles with javac. Typo in error, was meant to be "Cannot cast from List<List<Integer>> to Main.ListList<?>". looks like a bug not an enhancement I'll follow up on this. Created attachment 182291 [details]
junit test
Fails currently.
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. |
The following code wrongly produces the error "Incompatible conditional operand types List<List<Integer>> and Main2.ListList<?>" on the instanceof operator: public class Main { private static class ListList<T> extends ArrayList<List<T>> { } public static void main(String[] args) { List<List<Integer>> list = new ListList<Integer>(); System.out.println(list instanceof ListList<?>); } } It compiles fine with javac 1.5.0_19. -- Configuration Details -- Product: Eclipse 1.2.0.20090618-0904 (org.eclipse.epp.package.jee.product) Installed Features: org.eclipse.jdt 3.5.0.v20090527-2000-7r88FEeFJePyvYeA33DjZ_c1