Files
kotlin-fork/compiler/testData/codegen/box/involvesIrInterpreter/dumpIrAndCheck/stdlibConst.kt
T
Ivan Kylchik 7cf9dda8dc [JS] Support evaluation of const intrinsics for K2
#KT-56023 Fixed
#KT-51582 Fixed
2023-03-24 15:55:04 +00:00

16 lines
328 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// TARGET_BACKEND: NATIVE
// TARGET_BACKEND: JS_IR
// WITH_STDLIB
const val code = '1'.code
const val floorDiv = 10.floorDiv(2)
const val mod = 5.mod(3)
fun box(): String {
if (code != 49) return "Fail 1"
if (floorDiv != 5) return "Fail 2"
if (mod != 2) return "Fail 3"
return "OK"
}