Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354186 - result boolean = ((false && false) == false); evaluates to false in Java
Summary: result boolean = ((false && false) == false); evaluates to false in Java
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-08 16:36 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-08 16:36:06 EDT
EGL code:

   result = ((false && false) == false);

Gen Java Code

    result = false && false == false;

Get desired result if change generated java code to:

     result = (false && false) == false;

Other variations tried:

		myF, myF2, desired boolean = false;
		result boolean;
		
		result = ((myF && myF2) == desired);
		SysLib.writeStdout("test 1 " + result);
		
		result = (((0 > 1) && (0 > 1)) == (0 > 1));
		SysLib.writeStdout("test 2 " + result);
		
		result = ((false && false) == false);
		SysLib.writeStdout("test s " + result);

All get the same result
Comment 1 Jeff Douglas CLA 2011-08-08 18:08:24 EDT
fixed
Comment 2 Kathy Carroll CLA 2011-08-10 08:34:48 EDT
verified
Comment 3 Lisa Lasher CLA 2011-10-11 16:05:01 EDT
Closing this defect.