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

14 lines
230 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
class Foo {
protected var x = 0
fun getX() = Foo::x
}
fun box(): String {
val x = Foo().getX()
val foo = Foo()
x.set(foo, 42)
return if (x.get(foo) == 42) "OK" else "Fail"
}