JS: support integer overflow semantics for unary minus operator
See KT-19290
This commit is contained in:
+6
-1
@@ -26,5 +26,10 @@ fun box(): String {
|
||||
v = bigValue() * bigValue()
|
||||
if (v != 16) return "fail6: $v"
|
||||
|
||||
v = -minInt()
|
||||
if (v != Int.MIN_VALUE) return "fail7: $v"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
fun minInt() = Int.MIN_VALUE
|
||||
Reference in New Issue
Block a user