Description
|
public static explicit operator checked long(Int128 value) |
|
{ |
|
if (~value._upper == 0) |
|
{ |
|
long lower = (long)value._lower; |
|
return lower; |
|
} |
Overflows are ignored when lower >= 0.
Search if (~value._upper == 0) in that file to find more.
Reproduction Steps
Int128 a = new(ulong.MaxValue, 42);
var b = checked((long)a);
Console.WriteLine(b);
Expected behavior
OverflowException
Actual behavior
42
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response