| Summary: | ISA against literals and smallInt variable returning wrong results | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Kathy Carroll <carrollk> |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeffdouglas |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
add these variations
result = 34767 isa int;
showResults("34767 isa int", result, true);
result = 2147483650 isa bigint;
showResults("2147483650 isa bigint", result, true);
Fixed in the runtime Last variation should be true cause all. 123.45 isa decimal works in 201109161325 Closing this defect. Closing this defect. |
Testing string and smallint literals with ISA gives the wrong results. Using isa against a variable declared as Smallint fails. I'm uncertain what I should be expecting for the last variation. ========= EGL code ============== program driver type BasicProgram {} function main() result boolean; generic any?; mine smallint = 34; result = generic isa smallint; showResults("generic/null isa smallint", result, false); result = "literal" isa String; showResults("literal isaString", result, true); result = 34 isa String; showResults("34 isa String", result, false); result = 34 isa Any; showResults("34 isa Any", result, false); result = 34 isa int; showResults("34 isa int", result, false); result = 34 isa smallint; showResults("34 isa smallint", result, true); result = 34 isa float; showResults("34 isa float", result, false); result = 34 isa bigint; showResults("34 isa bigint", result, false); generic = 34; result = generic isa smallint; showResults("generic/literal isa smallint", result, true); result = mine isa smallint; showResults("mine/variable isa smallint", result, true); generic = mine; result = generic isa smallint; showResults("generic/variable isa smallint", result, true); result = 23.423 isa decimal(5,3); showResults("23.423 isa decimal(5,3)", result, true); result = 23.423 isa decimal(7,3); showResults("23.423 isa decimal(7,3)", result, false); reference decimal; reference = 23.234; result = reference isa decimal(5,3); showResults("reference isa decimal", result, true); result = 23.423 isa decimal; showResults("23.423 isa decimal", result, false); end function showResults(variation string in, actual boolean in, expecting boolean in) if (actual != expecting) syslib.writestdout("failed " + variation); else syslib.writestdout("passed"); end end end