Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357630 - Compile error on generated code for variable == null
Summary: Compile error on generated code for variable == null
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 09:42 EDT by Joseph Vincens CLA
Modified: 2017-02-23 14:18 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Vincens CLA 2011-09-14 09:42:10 EDT
function formatNumber(decValue decimal? in, format string? in) returns (string?)
		if ( decValue == null || format == null )
generates:
	public String formatNumber(BigDecimal decValue, String format) {
		if (((org.eclipse.edt.runtime.java.egl.lang.NullType.equals(decValue, null)) || (org.eclipse.edt.runtime.java.egl.lang.NullType.equals(EString.ezeBox(format), null)))) {

which has the compile error:
The method equals(AnyBoxedObject<R>, AnyBoxedObject<R>) in the type NullType is not applicable for the arguments (BigDecimal, null)
Comment 1 Paul Harmon CLA 2011-09-14 12:04:03 EDT
This is a general problem with making reference types compatible with the EGLAny. In this case, the reference type was Decimal, and it was being passed to the "equals" operation of NullType, which was expecting an ANY.

I have mofified IRUtils so that, if the type is any EglAny, we will always box the input expression.
Comment 2 Joseph Vincens CLA 2011-09-15 08:19:54 EDT
verified