Files
kotlin/compiler/testData/codegen/box/increment/postfixNullableIncrement.kt
Mikhail Glukhikh 4570872bfd Postfix expression code generation fixed as per KT-7561.
A set of tests for KT-7561 on codegen side, including exotic inc() functions().
 #KT-7561 Fixed.
2015-05-26 15:20:37 +03:00

11 lines
200 B
Kotlin
Vendored

fun Int?.inc(): Int? = this
fun init(): Int? { return 10 }
public fun box() : String {
var i : Int? = init()
val j = i++
return if (j == 10 && 10 == i) "OK" else "fail i = $i j = $j"
}