Allow unsigned integers overflow values of corresponding signed numbers

This commit is contained in:
Mikhail Zarechenskiy
2018-05-29 03:00:39 +03:00
parent 0da3ae328e
commit 5b5d9dd5a0
11 changed files with 138 additions and 35 deletions
@@ -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"
}