Allow unsigned integers overflow values of corresponding signed numbers
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// !LANGUAGE: +InlineClasses
|
||||
// !SKIP_METADATA_VERSION_CHECK
|
||||
// WITH_UNSIGNED
|
||||
|
||||
fun box(): String {
|
||||
val u1: UByte = 255u
|
||||
if (u1.toByte().toInt() != -1) return "fail"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user