Community
Participate
Working Groups
Build Version: 201109192102 Create a RUIHandler contains the following code will have compile error and generates the below errors. The problem is in this statement if(myDelegate==null): delegate cannot compare with null(equal or not equal). Null is parsed as StructPart type, is this the problem? -- TestCase -- Delegate myDelegate() end handler testNull type RUIhandler{initialUI =[ ], onConstructionFunction = start, cssFile = "css/testIR.css", title = "testNull"} myDelegate MyDelegate?; function start() if(myDelegate==null) syslib.writeStdout("compare to null"); end end end -- Errors -- Caused by: java.lang.ClassCastException: org.eclipse.edt.mof.egl.impl.DelegateImpl incompatible with org.eclipse.edt.mof.egl.StructPart at org.eclipse.edt.mof.egl.utils.TypeUtils.areCompatible(TypeUtils.java:264) at org.eclipse.edt.mof.egl.utils.TypeUtils.getBestFitFunctionMember(TypeUtils.java:846) at org.eclipse.edt.mof.egl.utils.TypeUtils.getBestFitOperation(TypeUtils.java:801) at org.eclipse.edt.mof.egl.utils.IRUtils.primGetNoConversionBinaryOperation(IRUtils.java:671) at org.eclipse.edt.mof.egl.utils.IRUtils.getNoConversionBinaryOperation(IRUtils.java:646) at org.eclipse.edt.mof.egl.utils.IRUtils.primGetBinaryOperation(IRUtils.java:732) at org.eclipse.edt.mof.egl.utils.IRUtils.getBinaryOperation(IRUtils.java:691) at org.eclipse.edt.mof.egl.impl.BinaryExpressionImpl.resolveOperation(BinaryExpressionImpl.java:60) at org.eclipse.edt.mof.egl.impl.MultiOperandExpressionImpl.getOperation(MultiOperandExpressionImpl.java:43) at org.eclipse.edt.mof.egl.impl.MultiOperandExpressionImpl.getType(MultiOperandExpressionImpl.java:58) at org.eclipse.edt.mof.egl.impl.BinaryExpressionImpl.resolveOperation(BinaryExpressionImpl.java:60) at org.eclipse.edt.mof.egl.impl.MultiOperandExpressionImpl.getOperation(MultiOperandExpressionImpl.java:43) at org.eclipse.edt.mof.egl.impl.MultiOperandExpressionImpl.getType(MultiOperandExpressionImpl.java:58) at org.eclipse.edt.mof.egl.utils.IRUtils.makeExprCompatibleToType(IRUtils.java:423) at org.eclipse.edt.gen.javascript.templates.IfStatementTemplate.genStatementBody(IfStatementTemplate.java:30) at sun.reflect.GeneratedMethodAccessor209.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:357) Reproducible: always
Tooltip.egl,DataGrid.egl, Controller.egl, FormManager.egl, ValidationForm.egl are suffering from this defect.
i have updated TypeUtils to fix this
Verified in build 201109242101