| Summary: | Bitwise operation and % on a nullable int results in java compile error | ||
|---|---|---|---|
| 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: | mheitz |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
program driver type BasicProgram {}
int1 int? = 75;
int5 int? = 2;
int6 int? = -2;
intActual int?;
intExpect int?;
variation string = "testing";
function main()
runArithmeticFunction13();
runArithmeticFunction14();
end
function assertTrue()
success boolean = (intExpect == intActual);
if (!success)
Syslib.writeStdOut(variation);
SysLib.writeStdOut(" actual " + intActual);
SysLib.writeStdOut(" expect " + intExpect);
end
end
function runArithmeticFunction13()
variation = "operation % with literals";
intActual = int1 % int5;
intExpect = 1;
assertTrue();
end
function runArithmeticFunction14()
variation = "operation % with negative literals";
intActual = int1 % int6;
intExpect = 1;
assertTrue();
end
end
I added the missing EInt.bitand (plus its friends, bitor and xor). The % problem was fixed by updating the generator. It was generating calls to a method named modulo, but the correct name is remainder. verified Closing this defect. |
EDT Code program driver type BasicProgram {} function main() int1 int = 13; int2 int = 27; int1n int? = 13; int2n int? = 27; int3 int; int3 = int1 & int2; int3 = int1n & int2n; end end First assigment to int3 is fine. Second statement gets this error: The method bitand(Integer, Integer) is undefined for the type EInt