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

Bug 357220

Summary: Passing integer literal as a function parameter produces invalid java
Product: z_Archived Reporter: Kathy Carroll <carrollk>
Component: EDTAssignee: Project Inbox <edt.javagen-inbox>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P3 CC: jeffdouglas
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Kathy Carroll CLA 2011-09-09 08:10:13 EDT
=====  EGL Code ===========

program driver type BasicProgram {}
	function main()
		writeResultSummary(3);
	end	
	function writeResultSummary(expectedTestCnt int in)
		syslib.writestdout(expectedTestCnt);
	end	
end

========  Java code ==========

	public void main() {
		int eze$Temp1 = null;
		eze$Temp1 = (int)((short) 3);
		writeResultSummary(eze$Temp1);
	}

===========  Java Error ==========
Type mismatch: cannot convert from null to int
Comment 1 Jeff Douglas CLA 2011-09-09 09:21:21 EDT
fixed
Comment 2 Kathy Carroll CLA 2011-09-09 09:43:56 EDT
Verified with development code
Comment 3 Lisa Lasher CLA 2011-10-11 16:11:34 EDT
Closing this defect.