Community
Participate
Working Groups
Build Identifier: 201110090901 Some compiler errors in Eunit test cases Reproducible: Always Steps to Reproduce: 1. Check out project "org.eclipse.edt.eunit.test" from kan-cvs. 2. Add both Java and JavaScript Generator to the project. 3. Clean the whole workspace. 4. The compile errors exist in: fvt.datatypes.TestAnyTypeLib(line 423) fvt.datatypes.TestCollectionsLib(line 1281) fvt.Json.JSONTestsLib(line 504) fvt.primitives.TestDeclarationsLib(line 21) fvt.primitives.TestDictionaryLib(line 462)
Setting to P1. I'm going to leave this as 'major' due to the number of tests that it affects. I am changing the component to JavaScript due to the fact that the Java generator does not throw this CCE. Scott, I noticed that the JS generator is looking to see if elements are nullable when the CCE is thrown, while the Java generator does not appear to be doing this check (at least not in ArrayAccessTemplate::genArrayAccess). When you get around to looking at this problem, it would be good to know if Java is missing any functionality in this area.
Caused by: java.lang.ClassCastException: org.eclipse.edt.mof.egl.impl.EGLClassImpl cannot be cast to org.eclipse.edt.mof.egl.ArrayType at org.eclipse.edt.gen.javascript.templates.ArrayAccessTemplate.genArrayAccess(ArrayAccessTemplate.java:55) at org.eclipse.edt.gen.javascript.templates.ArrayAccessTemplate.genExpression(ArrayAccessTemplate.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.edt.mof.codegen.api.TemplateContext.doInvoke(TemplateContext.java:362) ... 154 more
Fixed (for what it's worth, this generation problem was responsible for only approx. 8 of the many compile errors in the eunit test cases, perhaps mostly due to recent lang changes such as timestamp not being instantiable).
Fixed
Verified in build 20111019, it works fine.