Refactor ImplementationBodyCodegen.getTraitImplementations()

Make it static, extract a method which finds an implementation in a trait for a
fake override
This commit is contained in:
Alexander Udalov
2014-04-08 18:37:02 +04:00
parent 5967befa6a
commit fc838dbb53
16 changed files with 145 additions and 105 deletions
@@ -0,0 +1,18 @@
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()
}