Files
kotlin-fork/compiler/testData/codegen/box/traits/withRequired/kt2963.kt
T
Alexander Udalov fc838dbb53 Refactor ImplementationBodyCodegen.getTraitImplementations()
Make it static, extract a method which finds an implementation in a trait for a
fake override
2014-04-11 21:57:46 +04:00

16 lines
249 B
Kotlin

open class Base
trait Derived : Base {
fun foo(): String {
return object {
fun bar() = baz(this@Derived)
}.bar()
}
}
class DerivedImpl : Derived, Base()
fun baz(b: Base) = "OK"
fun box() = DerivedImpl().foo()