mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
A set of tests for KT-7561 on codegen side, including exotic inc() functions(). #KT-7561 Fixed.
10 lines
263 B
Kotlin
Vendored
10 lines
263 B
Kotlin
Vendored
public fun box() : String {
|
|
var i : Int?
|
|
i = 10
|
|
// Postfix increment on a smart cast should work
|
|
// Specific: i.inc() type is Int but i and j types are both Int?
|
|
val j = i++
|
|
|
|
return if (j == 10 && 11 == i) "OK" else "fail j = $j i = $i"
|
|
}
|