Extension properties in class: don't put receiver on stack for GETFIELD/PUTFIELD instruction
#KT-3031 Fixed
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
class Test {
|
||||
var Int.foo: String = "fail"
|
||||
set(str: String) {
|
||||
$foo = str
|
||||
}
|
||||
|
||||
fun test(): String {
|
||||
val i = 1
|
||||
i.foo = "OK"
|
||||
return i.foo
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return Test().test()
|
||||
}
|
||||
Reference in New Issue
Block a user