Summary: | [1.5][compiler] Misleading error message for "instanceof List<Object>" | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Jerome Lanneluc <jerome_lanneluc> | ||||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | philippe_mulet | ||||||
Version: | 3.4 | ||||||||
Target Milestone: | 3.5 M4 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Jerome Lanneluc
2008-12-09 05:02:01 EST
True, but note that quickfix caused a compile error to be raised, which is bad when attempting to fix a warning... they should het a bug opened as well. (In reply to comment #1) > True, but note that quickfix caused a compile error to be raised, which is bad > when attempting to fix a warning... they should het a bug opened as well. Entered bug 258059 against JDT/UI Note also, that our message wasn't good for instanceof T (type param). e.g. import java.util.*; public class X { <T extends List<Object>> boolean foo2() { return null instanceof T; } } --> Cannot perform instanceof check against type parameter T. Use instead its erasure List<E> since generic type information will be erased at runtime Will fix it as well. Added GenericTypeTest#test1426 Created attachment 119898 [details]
Proposed patch
Created attachment 119906 [details]
Better patch
Released for 3.5M4 Fixed Verified for 3.5M4 using I20081211-0100 |