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.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
public 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"
|
||||
}
|
||||
Reference in New Issue
Block a user