Files
kotlin-fork/compiler/testData/codegen/box/delegation/delegationDifferentModule.kt
T
2021-03-31 15:57:03 +03:00

17 lines
251 B
Kotlin
Vendored

// MODULE: lib
// FILE: lib.kt
interface A {
fun foo(): String
}
abstract class B(a: A) : A by a
// MODULE: main(lib)
// FILE: main.kt
class AImpl : A {
override fun foo(): String = "OK"
}
class C : B(AImpl())
fun box(): String = C().foo()