Community
Participate
Working Groups
The following egl expression produces the stack trace below: xx Encoding = Encoding.XML; if(xx == Encoding.XML) writestdout(" "); end Caused by: org.eclipse.edt.mof.egl.NoSuchFunctionError at org.eclipse.edt.mof.egl.impl.BinaryExpressionImpl.resolveOperation(BinaryExpressionImpl.java:61) at org.eclipse.edt.mof.egl.impl.MultiOperandExpressionImpl.getOperation(MultiOperandExpressionImpl.java:43)
Created attachment 200708 [details] Library that exhibits enumeration problems
Can't pass an enumeration as a function parameter. IRUtils.makeExprCompatibleToType does if (exprType.equals(type) || exprType.getClassifier().equals(type)) exprType.equals(type) calls Enumeration.equals which does this == eglType, which fails because they are not the same object even though this and eglType are the same type Instance of: org.eclipse.edt.mof.egl.Enumeration - eglx._service.Encoding.
There have been a few improvements with locating the operations when dealing with enums, as well as changes to the makeCompat routine. This seems to be working ok now. The only strange thing I see is that there is a couple of boxing operations happening in the generated java: if ((EglAny.ezeBox(xx) == EglAny.ezeBox(Encoding.XML))) { } These do not appear to cause any problems though.
verified