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

Bug 357575

Summary: ClassCastException on call statement
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: greer, hjiyong, jqian, jvincens, mheitz, pharmon, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-09-13 18:51:06 EDT
Build Identifier: 20110912

Get the following errors on call myProgram(myCustomer, interestRate);

Multiple markers at this line
	- IWN.JavascriptGen.9998.e 9/139 Exception occurred: java.lang.ClassCastException: 
	 org.eclipse.edt.mof.egl.impl.PartNameImpl cannot be cast to org.eclipse.edt.mof.egl.MemberAccess
	- IWN.JavascriptGen.9999.e 9/139 Stack Trace: java.lang.ClassCastException: org.eclipse.edt.mof.egl.impl.PartNameImpl 
	 cannot be cast to org.eclipse.edt.mof.egl.MemberAccess

program callPgm type BasicProgram {}
	myCustomer string;
	interestRate decimal(2);  	
	function main()
		call myProgram(myCustomer, interestRate); 
	end	
end

program myProgram (myCustomer string, interestRate decimal(4))
	function main()	
		sysLib.writeStdout("Got here");
	end
end

Reproducible: Always
Comment 1 Scott Greer CLA 2011-09-21 13:37:47 EDT
Programs aren't supported in JS, so Matt suggested assigning this to Compiler since this should be an error detected in validation.
Comment 2 Paul Harmon CLA 2011-10-27 18:04:47 EDT
JavaScript generator should ignore parts (like programs) that it doesnt support and simply not generate anything for them. I am reassigning this back to JS gen.
Comment 3 Jing Qian CLA 2011-11-15 15:13:11 EST
defer to future, since we do not support called program in 070

js gen should issue meaningful message at generation time
Comment 4 Joseph Vincens CLA 2012-07-02 14:46:07 EDT
validation added to disallow calling a program
Comment 5 Matt Heitz CLA 2013-01-03 10:44:37 EST
Moving old fixed bugs from the RESOLVED state to CLOSED.