Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356527

Summary: Error on assignment of int to string
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: mheitz
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-09-01 16:42:38 EDT
Build Identifier: 20110901

Debug or run the following program.
Get message: java.lang.Short cannot be cast to java.lang.Integer

program cast type BasicProgram {}	
	myINTList     INT[] = [1,2,3];
	myString string;	
	function main()
		myString = myINTList[3]; 
		sysLib.writeStdout(myString);
	end	
end

Reproducible: Always
Comment 1 Matt Heitz CLA 2011-09-06 13:49:57 EDT

*** This bug has been marked as a duplicate of bug 355014 ***
Comment 2 Jeff Douglas CLA 2011-09-06 15:41:48 EDT
The problem is that the array literal type is being altered to esmallint even though it's an array being assigned to int. The logic needs to override this somehow. Needs more work.
Comment 3 broy2 CLA 2011-09-06 16:23:51 EDT
Changing from closed to resolved so I can test it when 355014 is fixed.
Comment 4 broy2 CLA 2011-09-27 14:38:02 EDT
Verified in 20110927 build.