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

Bug 348140

Summary: NPE from nested record field access in initializer when generating
Product: z_Archived Reporter: Justin Spadea <jspadea>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: jeffdouglas, mheitz
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Justin Spadea CLA 2011-06-02 16:45:44 EDT
I'm not sure if this is a bug in core or a misuse of the IR from the generators. The IR compiles cleanly and "looks correct" as far as I can tell, but throws an error as shown below.

record progrec
	f foorec;
end

record foorec
	s string;
end

program prog
	p progrec{f{s = "test"}};

	function main()
	end
end



Caused by: java.lang.NullPointerException
	at org.eclipse.edt.mof.egl.impl.MemberNameImpl.getType(MemberNameImpl.java:37)
	at org.eclipse.edt.mof.egl.impl.SetValuesExpressionImpl.getType(SetValuesExpressionImpl.java:55)
	at org.eclipse.edt.mof.egl.impl.QualifiedFunctionInvocationImpl.resolveFunction(QualifiedFunctionInvocationImpl.java:110)
	at org.eclipse.edt.mof.egl.impl.QualifiedFunctionInvocationImpl.getTarget(QualifiedFunctionInvocationImpl.java:49)
	... 69 more
Comment 1 Jeff Douglas CLA 2011-10-01 16:44:00 EDT
works now
Comment 2 Justin Spadea CLA 2011-11-04 14:17:53 EDT
Verified