Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354385 - Java compile error using ::= operand to append element to record list
Summary: Java compile error using ::= operand to append element to record list
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-10 10:41 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:16 EST (History)
1 user (show)

See Also:


Attachments

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