fc838dbb53
Make it static, extract a method which finds an implementation in a trait for a fake override
23 lines
376 B
Kotlin
23 lines
376 B
Kotlin
open class Base {
|
|
open fun foo() { }
|
|
open fun foo2() { }
|
|
}
|
|
|
|
trait Derived : Base {
|
|
override fun foo() {
|
|
object {
|
|
fun bar() {
|
|
//super<Base>@Derived.foo2()
|
|
this@Derived.foo2()
|
|
}
|
|
}.bar()
|
|
}
|
|
}
|
|
|
|
class DerivedImpl : Derived, Base()
|
|
|
|
fun box(): String {
|
|
DerivedImpl().foo()
|
|
return "OK"
|
|
}
|