Bug 87267

Summary: [1.5][compiler] cast from Integer[] to int[] should fail
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Philipe Mulet CLA 2005-03-07 09:54:07 EST
Build 3.1m5a

The following code should be rejected:
public class X {
	public static void main(String[] args) {
		Integer[] integers = {};
		int[] ints = (int[]) integers;
	}
}
Comment 1 Philipe Mulet CLA 2005-03-07 10:00:32 EST
Code was incorrectly allowed due to autoboxing when recursing in array element
types.
Added AutoboxingTest#test100.
Fixed
Comment 2 David Audel CLA 2005-03-31 09:44:19 EST
Verified in I20050330-0500