The specification says nothing about what the result of a numeric cast is when the value is outside the receiving type's range. For example: ``` uint a = 260; auto b = cast(ubyte) a; float f = 1.203125f * 255.0f; auto zz = cast(ubyte) f; ``` Not having the result specified currently means that it is treated as UB by LDC and GDC.
Issue 21279 for integers now has a pull request. Issue 22527 for float -> int was fixed. Closing in favour of those. *** This issue has been marked as a duplicate of issue 21279 ***
> Issue 22527 for float -> int was fixed. See: https://dlang.org/spec/expression.html#cast_floating