fc838dbb53
Make it static, extract a method which finds an implementation in a trait for a fake override
15 lines
237 B
Kotlin
15 lines
237 B
Kotlin
open class Base
|
|
|
|
trait Trait : Base {
|
|
private val value : String
|
|
get() = "OK"
|
|
|
|
override fun toString() = object {
|
|
fun foo() = value
|
|
}.foo()
|
|
}
|
|
|
|
class Derived : Trait, Base()
|
|
|
|
fun box() = "${Derived()}"
|