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

19 lines
275 B
Kotlin

open class Base {
open fun foo() : String {
return "fail"
}
}
trait Derived : Base {
override fun foo() : String {
//super.foo()
return "OK"
}
}
class DerivedImpl : Derived, Base()
fun box(): String {
return DerivedImpl().foo()
}