Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357575 - ClassCastException on call statement
Summary: ClassCastException on call statement
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-13 18:51 EDT by broy2 CLA
Modified: 2017-02-23 14:17 EST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.