Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356527 - Error on assignment of int to string
Summary: Error on assignment of int to string
Status: CLOSED DUPLICATE of bug 355014
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 16:42 EDT by broy2 CLA
Modified: 2017-02-23 14:19 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.