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

11 lines
275 B
Kotlin
Vendored

fun box() : String {
var i : Int?
i = 10
// We have "double" smart cast here:
// first on i and second on i++
// Back-end should NOT think that both i and j are Int
val j: Int = i++
return if (j == 10 && 11 == i) "OK" else "fail j = $j i = $i"
}