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

Bug 358669

Summary: Errors in generated Java on: move "abc" to target for 3;
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-22 17:31:27 EDT
program moveStmt type BasicProgram {}	
	target string[] {"xyz"};	
	function main()
		target.resize(10);
    	move "abc" to target for 3;
	end	
end

String eze$Temp2 = "abc";
for ( int eze$Temp3 = (int)Math.min(Math.min(eze$Temp2.getSize(), target.getSize()),(short) 3); eze$Temp3 > 0; eze$Temp3-- )
{
	target.set(eze$Temp3 - 1, EString.ezeCast(eze$Temp2.get(eze$Temp3 - 1)));
}

The method getSize() is undefined for the type String	moveStmt.java	
The method get(int) is undefined for the type String	moveStmt.java
Comment 1 Matt Heitz CLA 2011-09-22 21:31:58 EDT
I wrote the move statement generation thinking that the source move a move-for was always an array.  Not right.

Once we decide to support the move statement, we also need to have syntax for specifying the starting point of the move-for on the target, and also the source if it's an array too.
Comment 2 Matt Heitz CLA 2012-11-12 13:25:17 EST

*** This bug has been marked as a duplicate of bug 366738 ***
Comment 3 Matt Heitz CLA 2012-11-12 13:25:56 EST

*** This bug has been marked as a duplicate of bug 376638 ***