Files
kotlin-fork/compiler/testData/codegen/box/traits/withRequired/traitFuncCall.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

18 lines
264 B
Kotlin

open class Foo() {
public fun k(): String = "K"
}
trait T: Foo {
public fun xyzzy(): String = o() + k()
public fun o(): String
}
class TImpl(): Foo(), T {
public override fun o(): String = "O"
}
fun box(): String {
return TImpl().xyzzy()
}