From dda6d205200884cb200f44a08c0b84e3b5367b2a Mon Sep 17 00:00:00 2001 From: Kirill Rakhman Date: Thu, 14 Sep 2023 11:43:43 +0200 Subject: [PATCH] [FIR] Add test for WRONG_MULTIPLE_INHERITANCE with typealias #KT-61921 --- .../wrongMultipleInheritance.kt | 3 + .../wrongMultipleInheritance.txt | 56 ------------------- 2 files changed, 3 insertions(+), 56 deletions(-) delete mode 100644 compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.txt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.kt b/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.kt index f7672feb001..53d013f6c22 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.kt @@ -5,7 +5,10 @@ open class A { fun get(index: Int): Char = '*' } +typealias TA = A + abstract class B : A(), CharSequence +abstract class B2 : TA(), CharSequence interface I { fun nextChar(): Char diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.txt b/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.txt deleted file mode 100644 index 30c56ea4cea..00000000000 --- a/compiler/testData/diagnostics/testsWithJsStdLib/wrongMultipleInheritance.txt +++ /dev/null @@ -1,56 +0,0 @@ -package - -public open class A { - public constructor A() - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun get(/*0*/ index: kotlin.Int): kotlin.Char - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public abstract class B : A, kotlin.CharSequence { - public constructor B() - public abstract override /*1*/ /*fake_override*/ val length: kotlin.Int - public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final override /*2*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.Char - public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract override /*1*/ /*fake_override*/ fun subSequence(/*0*/ startIndex: kotlin.Int, /*1*/ endIndex: kotlin.Int): kotlin.CharSequence - public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String -} - -public abstract class C : kotlin.collections.CharIterator, I { - public constructor C() - public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun hasNext(): kotlin.Boolean - public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final override /*1*/ /*fake_override*/ fun next(): kotlin.Char - public open override /*2*/ fun nextChar(): kotlin.Char - public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String -} - -public final class CC : kotlin.CharSequence, MyCharSequence { - public constructor CC(/*0*/ s: kotlin.CharSequence) - public open override /*2*/ /*delegation*/ val length: kotlin.Int - public final val s: kotlin.CharSequence - public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*2*/ /*delegation*/ fun get(/*0*/ index: kotlin.Int): kotlin.Char - public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int - public open override /*2*/ /*delegation*/ fun subSequence(/*0*/ startIndex: kotlin.Int, /*1*/ endIndex: kotlin.Int): kotlin.CharSequence - public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface I { - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract fun nextChar(): kotlin.Char - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -} - -public interface MyCharSequence { - public abstract val length: kotlin.Int - public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public abstract operator fun get(/*0*/ index: kotlin.Int): kotlin.Char - public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public abstract fun subSequence(/*0*/ startIndex: kotlin.Int, /*1*/ endIndex: kotlin.Int): kotlin.CharSequence - public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String -}