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

Bug 357676

Summary: generated java has compilation errors
Product: z_Archived Reporter: Jing Qian <jqian>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: critical    
Priority: P3 CC: carrollk, jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Jing Qian CLA 2011-09-14 15:36:55 EDT
try the following program

The generated java has compilation errors for b

package a;

delegate jingDelegate(i int) end


// basic program
//
program Hello type BasicProgram {}
	
	function main()
		sysLib.writeStdOUt("abc");
		a jingDelegate?[] = new jingDelegate?[1];
		a[1] = function1;		
		a[1](4);
		
//		b jingDelegate[] = new jingDelegate[]{function1};
//		b[1](5);
		
		b1 jingDelegate[]{function1};
		b1[1](3);
		//c jingDelegate[] = [function1];			//not allowed
		
		d jingDelegate[] = new jingDelegate[];
		d ::= function1;
		d[1](6);
				
	end
	
	function function1(i int)
		i += 5;
		sysLib.writeStdout("function1 is delegate, i is " + i);
	end
end
Comment 1 Jing Qian CLA 2011-09-14 15:43:23 EDT
sorry, please uncomment out the lines for b
Comment 2 Jeff Douglas CLA 2011-09-14 20:09:19 EDT

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