KT-36956 fix back-end part in JVM and JVM_IR
PSI2IR: deparenthesize LHS expression when generating assignment receiver. FE: record 'set' operator call for code generation.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class Cell(var x: Int) {
|
||||
operator fun get(i: Int) = x
|
||||
operator fun set(i: Int, v: Int) { x = v }
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val c = Cell(0)
|
||||
(c[0])++
|
||||
if (c[0] != 1) return "Fail"
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user