Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358102 - IRUtils.makeCompatible adds BoxingExpressions to enum comparison
Summary: IRUtils.makeCompatible adds BoxingExpressions to enum comparison
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: Jeff Douglas CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 358233 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-19 08:21 EDT by Matt Heitz CLA
Modified: 2017-02-23 14:16 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Heitz CLA 2011-09-19 08:21:20 EDT
This causes several failures in Java in the testcase I wrote on Friday for the language enhancements about nullablity, arrays, and curly braces.  I expect it'll cause failures in JavaScript too.

IRUtils.makeCompatible(BinaryExpression expr, Type type1, Type type2) is boxing when we compare two enumeration values, but it shouldn't.  Here's a simple testcase.


package y;

program enums
	function main()
		ok1 OrderingKind = OrderingKind.byKey;
		ok2 OrderingKind = OrderingKind.byKey;
		if ( ok1 == ok2 )
			SysLib.writeStdout( "== worked" );
		else
			SysLib.writeStdout( "== failed" );
		end
		ok2 = OrderingKind.none;
		if ( ok1 != ok2 )
			SysLib.writeStdout( "!= failed" );
		else
			SysLib.writeStdout( "!= worked" );
		end
	end
end
Comment 1 Matt Heitz CLA 2011-09-20 09:03:43 EDT
*** Bug 358233 has been marked as a duplicate of this bug. ***
Comment 2 Jeff Douglas CLA 2011-09-21 11:04:44 EDT
fixed
Comment 3 Matt Heitz CLA 2011-10-04 14:30:23 EDT
Verified.