Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 345775 - CCE when declaring a field inside a function of an unknown type
Summary: CCE when declaring a field inside a function of an unknown type
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-13 15:16 EDT by Justin Spadea CLA
Modified: 2017-02-23 14:19 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Justin Spadea CLA 2011-05-13 15:16:04 EDT
library lib
	function test()
		x xyz;
	end
end


Type xyz doesn't exist, but instead of getting a validation error I get a CCE:

java.lang.ClassCastException: org.eclipse.edt.compiler.binding.NotFoundBinding incompatible with org.eclipse.edt.compiler.binding.LocalVariableBinding
	at org.eclipse.edt.mof.egl.egl2mof.Egl2MofStatement.visit(Egl2MofStatement.java:128)
	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:165)
	at org.eclipse.edt.mof.egl.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.Library.accept(Library.java:49)
	at org.eclipse.edt.mof.egl.egl2mof.Egl2Mof.convert(Egl2Mof.java:41)
Comment 1 Paul Harmon CLA 2011-07-18 12:06:12 EDT
I could not recreate the original problem (I think this was fixed sometime along the way).

However, when testing in SDK, I got a different error. This was caused by some strings not being interned before they were used to look up an annotationType in AnnotationTypeManager.

I have modified EGL2MofMember and Mof2BindingBase to fix this.
Comment 2 Justin Spadea CLA 2011-09-08 14:33:51 EDT
Verified