Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357676 - generated java has compilation errors
Summary: generated java has compilation errors
Status: CLOSED DUPLICATE of bug 357665
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 15:36 EDT by Jing Qian CLA
Modified: 2017-02-23 14:18 EST (History)
2 users (show)

See Also:


Attachments

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