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

Bug 354385

Summary: Java compile error using ::= operand to append element to record list
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-08-10 10:41:55 EDT
EGL Code
==============
package explore;
library tester {}

	function persistResult(name string, pkgName string, resultRootSum ResultSummaryRoot)
		//append the test case summary to result root summary 
		resultSum ResultSummary;
		resultSum.name = name;
		resultSum.pkgName = pkgName;
		resultRootSum.trSummary ::= resultSum;
	end
end

Record ResultSummary
	pkgName String {@XMLAttribute{}};	//package name
	name String{@XMLAttribute{}};		//test library part name
end
Record ResultSummaryRoot
	trSummary ResultSummary[]{};
end
================
package explore;
program driver type BasicProgram {}
	use tester;
			function main() 
		resultRootSum ResultSummaryRoot;
		persistResult("Name 1", "PkgName 1", resultRootSum);
		persistResult("Name 2", "PkgName 2", resultRootSum);
		syslib.writeStdOut("done");
 	end
end
=======================

Java error msg

The operator += is undefined for the argument type(s) EglList<ResultSummary>, AnyBoxedObject<ResultSummary>

Java code:

		ResultSummary resultSum = new ResultSummary();
		resultSum.name = name.ezeUnbox();
		resultSum.pkgName = pkgName.ezeUnbox();
		resultRootSum.trSummary += EglAny.ezeBox(resultSum);
Comment 1 Jeff Douglas CLA 2011-08-11 15:24:39 EDT
fixed
Comment 2 Kathy Carroll CLA 2011-08-12 07:51:16 EDT
Verified
Comment 3 Lisa Lasher CLA 2011-10-11 16:07:51 EDT
Closing this defect.