Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360413 - Some compiler errors in Eunit test cases
Summary: Some compiler errors in Eunit test cases
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-10 05:38 EDT by pf yu CLA
Modified: 2017-02-23 14:19 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pf yu CLA 2011-10-10 05:38:03 EDT
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)
Comment 1 Brian Svihovec CLA 2011-10-10 13:45:34 EDT
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.
Comment 2 Brian Svihovec CLA 2011-10-10 13:45:47 EDT
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
Comment 3 Scott Greer CLA 2011-10-19 13:31:54 EDT
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).
Comment 4 Scott Greer CLA 2011-10-19 13:33:38 EDT
Fixed
Comment 5 pf yu CLA 2011-10-20 04:25:44 EDT
Verified in build 20111019, it works fine.