Bug 165352 - [1.5][compiler] Cast should be rejected
Summary: [1.5][compiler] Cast should be rejected
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-21 12:59 EST by Philipe Mulet CLA
Modified: 2007-10-29 08:52 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2006-11-21 12:59:10 EST
3.3M3

Probably a dup, but likely interesting simply testcase:
Both cast should be rejected, we only complain about the latter.

class Z1 {
	void foo(ArrayList<Object> a) {
		Object o = (List<? extends String>) a; // ko
	}
	void bar(List<Object> a) {
		Object o = (ArrayList<? extends String>) a; // ko
	}
}
Comment 1 Philipe Mulet CLA 2007-10-09 17:04:33 EDT
Fixed along with changes for bug 158870.
Added GenericTypeTest#test1192
Released for 3.4M3
Fixed
Comment 2 Maxime Daniel CLA 2007-10-29 08:52:03 EDT
Verified for 3.4 M3 using build I20071029-0010.