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

10 lines
249 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_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"
}