Community
Participate
Working Groups
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
sorry, please uncomment out the lines for b
*** This bug has been marked as a duplicate of bug 357665 ***