Files
kotlin-fork/compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/unsignedConst.kt
T
Ivan Kylchik e981b1f958 [Native] Support evaluation of const intrinsics for K2
#KT-56023
#KT-55469 Fixed
2023-03-24 15:55:03 +00:00

16 lines
435 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// WITH_STDLIB
const val byteVal: UByte = 1u
const val shortVal: UShort = 2u
const val intVal: UInt = 3u
const val longVal: ULong = 4uL
fun box(): String {
if (byteVal != 1u.toUByte()) return "Fail 1"
if (shortVal != 2u.toUShort()) return "Fail 2"
if (intVal != 3u.toUInt()) return "Fail 3"
if (longVal != 4u.toULong()) return "Fail 4"
return "OK"
}