| Summary: | Compile error on generated code for variable == null | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Joseph Vincens <jvincens> |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mheitz, pharmon |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
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. verified |
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)