Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345775

Summary: CCE when declaring a field inside a function of an unknown type
Product: z_Archived Reporter: Justin Spadea <jspadea>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: lasher, mheitz, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

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