Files
kotlin-fork/compiler/testData/codegen/box/increment/postfixIncrementOnShortSmartCast.kt
T
Denis Zharkov 47ecaa5b06 FIR: Fix scope intersection types
Otherwise overload resolution ambiguity is reported in the test
2020-01-30 17:12:50 +03:00

9 lines
224 B
Kotlin
Vendored

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