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

Bug 356365

Summary: Complex assignment operators cause errors in generated Java
Product: z_Archived Reporter: broy2
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 broy2 CLA 2011-08-31 12:01:51 EDT
Build Identifier: 20110831

program pgm type BasicProgram{}
   a decimal(4);
   b decimal(4);
   c decimal(4);
   function main()
	a+=b;
	a-=b;
	a*=b;
	a/=b;
	a**=b;
	a%=b;
   end
end

The operator -= is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal	
The operator *= is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal	
The operator *= is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal	
The operator /= is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal	
The operator %= is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal	
The operator += is undefined for the argument type(s) java.math.BigDecimal, java.math.BigDecimal

It also looks like the message doesn't allow enough space for a 3 character operator.  The operator **= just has *= in the message.

Reproducible: Always
Comment 1 Jeff Douglas CLA 2011-09-09 15:24:42 EDT
fixed
Comment 2 broy2 CLA 2011-09-13 11:58:01 EDT
Verified in 20110912