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

Bug 358665

Summary: ClassCastException when compiling forward references for a function
Product: z_Archived Reporter: Brian Svihovec <svihovec>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Testcase. none

Description Brian Svihovec CLA 2011-09-22 16:59:28 EDT
Created attachment 203869 [details]
Testcase.

Import the attached EGL file.

When the file is saved and built, the following exception will be thrown:

org.eclipse.edt.compiler.internal.core.builder.BuildException: java.lang.ClassCastException: org.eclipse.edt.mof.egl.lookup.ProxyElement cannot be cast to org.eclipse.edt.mof.egl.FunctionMember
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:187)
	at org.eclipse.edt.compiler.internal.core.builder.AbstractProcessingQueue.process(AbstractProcessingQueue.java:152)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.processParts(AbstractBuilder.java:99)
	at org.eclipse.edt.ide.core.internal.builder.AbstractBuilder.build(AbstractBuilder.java:136)

Caused by: java.lang.ClassCastException: org.eclipse.edt.mof.egl.lookup.ProxyElement cannot be cast to org.eclipse.edt.mof.egl.FunctionMember
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofExpression.visit(Egl2MofExpression.java:361)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.FunctionInvocation.accept(FunctionInvocation.java:45)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofExpression.visit(Egl2MofExpression.java:179)
	at org.eclipse.edt.compiler.internal.egl2mof.Egl2Mof.visit(Egl2Mof.java:1)
	at org.eclipse.edt.compiler.core.ast.ArrayLiteral.accept(ArrayLiteral.java:38)
	at org.eclips
Comment 1 Paul Harmon CLA 2011-09-22 17:06:27 EDT
I have update the following to fix this:

EGL2MofExpression
FunctionInvocation
FunctionInvocationImpl
FunctionPartInvocationImpl
Comment 2 Brian Svihovec CLA 2012-01-16 21:42:39 EST
Verified in build 0.8.0.v201201120902-1CT-Fiv5_M5_LM5fUa4.