Bug 105049 - [1.5][compiler] Compiler doesn't warn about unchecked cast to non-reifiable array type
Summary: [1.5][compiler] Compiler doesn't warn about unchecked cast to non-reifiable a...
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-25 12:37 EDT by Markus Keller CLA
Modified: 2006-03-06 18:29 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2005-07-25 12:37:48 EDT
N20050725-0010

import java.util.List;
class Bug<E> {
    void method(Object o) {
        if (o instanceof List<E>[]) { //incorrect: bug 104695
            List<E>[] es= (List<E>[]) o; //unchecked
        }
    }
}

The cast to (List<E>[]) should be marked as unchecked cast.
Comment 1 Philipe Mulet CLA 2006-03-06 18:29:20 EST
Works as expected in latest.
Added GenericTypeTest#test0955