19 lines
240 B
Kotlin
Vendored
19 lines
240 B
Kotlin
Vendored
interface A {
|
|
val foo: String
|
|
}
|
|
|
|
class B : A {
|
|
override var foo: String = "Fail"
|
|
private set
|
|
|
|
fun setOK(other: B) {
|
|
other.foo = "OK"
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val b = B()
|
|
b.setOK(b)
|
|
return b.foo
|
|
}
|