Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355528 - int1 **= int2 produces invalid java code
Summary: int1 **= int2 produces invalid java code
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-23 11:21 EDT by Kathy Carroll CLA
Modified: 2017-02-23 14:20 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-23 11:21:11 EDT
Expecting this code 

		localInt int = 3;
		localInt **= 3;
		writeStdout(localInt);

To write out 27. Works in RBD.  

EDT generated Java

		int localInt = 0;
		localInt = (int)((short) 3);
		localInt **= (int)((short) 3);
Java error msg
    Syntax error on token "*", delete this token

RBD generated JAVA

int localInt = 0;
// localInt = 3;
localInt = (short)3;
// localInt = localInt ** 3;
localInt = com.ibm.javart.operations.AssignToInt.run( ezeProgram, com.ibm.javart.operations.Power.run( ezeProgram, localInt, (short)3 ) );
Comment 1 Jeff Douglas CLA 2011-09-09 15:44:46 EDT
I have fixed this code to use a runtime callout for power of, however until Paul fixes the bug related to the type of a binary expression, this will still give a java error. Please wait to verify this once Paul has fixed the other defect.
Comment 2 Kathy Carroll CLA 2011-09-16 14:03:34 EDT
201109161325
Comment 3 Lisa Lasher CLA 2011-10-11 16:09:38 EDT
Closing this defect.