Files
kotlin-fork/compiler/testData/diagnostics/tests/Delegation_MultipleDelegates.kt
T
2014-06-19 22:10:57 +04:00

19 lines
481 B
Kotlin

// !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS
trait One {
public open fun foo() : Int
private fun boo() = 10
}
trait Two {
public open fun foo() : Int
}
trait OneImpl : One {
public override fun foo() = 1
}
trait TwoImpl : Two {
public override fun foo() = 2
}
class <!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>Test1<!>() : TwoImpl, OneImpl {}
class Test2(a : One) : One by a, Two {}
class <!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>Test3<!>(a : One, b : Two) : Two by b, One by a {}