Comment #0 by computermatronic — 2018-07-02T00:35:32Z
Casting from a real to a ulong in a comparison does not compile, resulting in an internal compiler error.
Test case:
void main() {
real r = 10;
bool b = cast(ulong)r == 0;
}
Output:
Internal error: dmd\backend\cgcod.c 1688
Comment #1 by b2.temp — 2019-07-02T12:53:22Z
`real` is not a factor, can be `float` or `double` too. `ulong` is a factor.
Comment #2 by robert.schadek — 2024-12-13T18:59:25Z