Files
kotlin-fork/compiler/testData/codegen/box/extensionProperties/inClassWithSetter.kt
T
2019-11-19 11:00:09 +03:00

21 lines
318 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
class Test {
var storage = "Fail"
var Int.foo: String
get() = storage
set(value) {
storage = value
}
fun test(): String {
val i = 1
i.foo = "OK"
return i.foo
}
}
fun box(): String {
return Test().test()
}