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

Bug 358235

Summary: enumeration compare doesn't generate the correct code
Product: z_Archived Reporter: Joseph Vincens <jvincens>
Component: EDTAssignee: Joseph Vincens <jvincens>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Joseph Vincens CLA 2011-09-20 08:43:58 EDT
using the following EGL
        e1 ServiceType = ServiceType.EglDedicated;
        if(e1 == ServiceType.EglDedicated)
            syslib.writeStdout("e1 == ServiceType.EglDedicated");
        else
            syslib.writeStdout("e1 != ServiceType.EglDedicated");
        end
generates
			if (({eze$$value : {eze$$value : e1, eze$$signature : "eglx.rest.ServiceType"}, eze$$signature : "eglx.rest.ServiceType"} == {eze$$value : {eze$$value : egl.eglx.rest.ServiceType.EglDedicated, eze$$signature : "eglx.rest.ServiceType"}, eze$$signature : "eglx.rest.ServiceType"})) {
				egl.eglx.lang.SysLib.writeStdout(eze$Temp2);
			}
			else {
				egl.eglx.lang.SysLib.writeStdout(eze$Temp3);
			}
and the compare fails
Comment 1 Joseph Vincens CLA 2011-09-20 09:14:13 EDT
Since IRUtils.makeCompatible is used by JS this is probably a duplicate of 358102 - IRUtils.makeCompatible adds BoxingExpressions to enum comparison.
358102 is fixed I will verify that it also fixes JS gen.
Comment 2 Jeff Douglas CLA 2011-09-21 11:04:06 EDT
fixed
Comment 3 Joseph Vincens CLA 2011-10-03 09:10:35 EDT
verified