Files
kotlin-fork/compiler/testData/codegen/box/extensionProperties/inClassWithPrivateSetter.kt
T
2020-03-18 17:09:35 +03:00

20 lines
300 B
Kotlin
Vendored

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