Files
kotlin-fork/compiler/testData/codegen/box/increment/prefixIncrementOnSmartCast.kt
T
2019-11-19 11:00:09 +03:00

10 lines
223 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
public fun box() : String {
var i : Int?
i = 10
// Prefix increment on a smart cast should work
val j = ++i
return if (j == 11 && 11 == i) "OK" else "fail j = $j i = $i"
}