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

10 lines
254 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
public fun box() : String {
var i : Short?
i = 10
// Postfix increment on a smart casted short should work
val j = i++
return if (j!!.toInt() == 10 && i!!.toInt() == 11) "OK" else "fail j = $j i = $i"
}