Files
kotlin-fork/compiler/testData/codegen/box/extensionProperties/accessorForPrivateSetter.kt
T
2018-06-28 12:26:41 +02:00

23 lines
377 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
class A {
var result = "Fail"
private var Int.foo: String
get() = result
private set(value) {
result = value
}
fun run(): String {
class O {
fun run() {
42.foo = "OK"
}
}
O().run()
return (-42).foo
}
}
fun box() = A().run()