Files
kotlin-fork/compiler/testData/codegen/box/classLiteral/bound/javaIntrinsicWithSideEffect.kt
T
2018-06-09 19:15:38 +03:00

15 lines
355 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
fun box(): String {
var x = 42
val k = (x++)::class.java
if (k != Int::class.java) return "Fail 1: $k"
if (x != 43) return "Fail 2: $x (side effect should have taken place)"
return "OK"
}