-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Description
#69756 has several failures that occur across Mono:
Assert.Throws<OverflowException>(() => NumberBaseHelper<long>.CreateChecked<float>(+9223372036854775808.0f));
Assert.Throws<OverflowException>(() => NumberBaseHelper<ulong>.CreateChecked<double>(+18446744073709551616.0));In both cases the double and float used is the smallest representable double that is greater than long.MaxValue or ulong.MaxValue, respectively, and therefore it should always overflow.
However, Mono doesn't throw System.OverflowException instead. The same tests exist for x86/x64 where things are passing as expected.
#70087 likewise shows issues with conversion of float/double to nuint (System.UIntPtr) where it appears to always be treating the target type as 32-bits, even on 64-bit systems.