Community
Participate
Working Groups
Try to compile the following: program test function main() rec struct[2]; a any = rec[1].c.c2; end end record struct 10 c char(2)[2]; 20 c2 char(1)[2]; end Get an exception: java.lang.ClassCastException: org.eclipse.edt.mof.impl.EClassImpl incompatible with org.eclipse.edt.mof.egl.Type at org.eclipse.edt.mof.egl.egl2mof.Egl2MofExpression.visit(Egl2MofExpression.java:274) at org.eclipse.edt.mof.egl.egl2mof.Egl2Mof.visit(Egl2Mof.java:1) at org.eclipse.edt.compiler.core.ast.FieldAccess.accept(FieldAccess.java:52) at org.eclipse.edt.mof.egl.egl2mof.Egl2MofMember.addInitializers(Egl2MofMember.java:639) at org.eclipse.edt.mof.egl.egl2mof.Egl2Mof.addInitializers(Egl2Mof.java:1) at org.eclipse.edt.mof.egl.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:134) at org.eclipse.edt.mof.egl.egl2mof.Egl2Mof.visit(Egl2Mof.java:1) at org.eclipse.edt.compiler.core.ast.FunctionDataDeclaration.accept(FunctionDataDeclaration.java:76) at org.eclipse.edt.mof.egl.egl2mof.Egl2MofPart.handleEndVisitPart(Egl2MofPart.java:414) at org.eclipse.edt.mof.egl.egl2mof.Egl2MofPart.defaultHandleVisitPart(Egl2MofPart.java:333) at org.eclipse.edt.mof.egl.egl2mof.Egl2MofPart.visit(Egl2MofPart.java:144) at org.eclipse.edt.mof.egl.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
Created attachment 200029 [details] Add check for MultiplyOccuringItemTypeBinding Here's an attempt at a fix. It returns a value similar to array fields, but I don't know this code well enough to be confident in the fix.
I have fixed this (for now). It will likely require some rework when we support structured records and multi-occurs items in the future.
Verified