long a = 0; long b = 9223372036854775807; a = cast(double) b; writeln(b); writeln(a); The results are: b = 9223372036854775807 a = -9223372036854775808 This should not be possible.
In the case of a large negative or positive value stored in a long, an intermediate double will not fully store it, therefore this should not be possible without more explicit means.
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17685 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB