fc838dbb53
Make it static, extract a method which finds an implementation in a trait for a fake override
18 lines
251 B
Kotlin
18 lines
251 B
Kotlin
open class Base {
|
|
var s = "Fail"
|
|
}
|
|
|
|
trait Trait : Base {
|
|
var value : String
|
|
get() = s
|
|
set(value) { s = value }
|
|
}
|
|
|
|
class Derived : Trait, Base()
|
|
|
|
fun box(): String {
|
|
val d = Derived()
|
|
d.value = "OK"
|
|
return d.value
|
|
}
|