Files
kotlin/compiler/testData/codegen/bytecodeText/traitImplGeneratedOnce.kt
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
247 B
Kotlin

trait A {
fun foo() = 42
}
open class B : A
open class C : B()
class D : C()
// Implementation of foo() should only be generated into B
// 1 INVOKESTATIC A\$\$TImpl.foo
// Only two declarations should be present: in A and B
// 2 foo\(\)I