K2: repeat K1 behavior around multiple inheritance by delegation

#KT-56720 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-03-03 10:13:11 +01:00
committed by Space Team
parent ab883d91c8
commit 45e78455b2
10 changed files with 127 additions and 22 deletions
@@ -5,6 +5,10 @@ interface A {
fun foo() {}
}
// FILE: BJ.java
public interface BJ extends A {}
// FILE: B.kt
interface B : A
@@ -18,3 +22,7 @@ interface C : A
class Adapter : B, C
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class D<!>(val adapter: Adapter) : B by adapter, C by adapter
class AdapterJ : BJ, C
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class DJ<!>(val adapter: AdapterJ) : BJ by adapter, C by adapter