Files
kotlin-fork/compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt
T
2021-08-01 22:23:40 +03:00

9 lines
217 B
Kotlin
Vendored

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"
}