diff --git a/compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt b/compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt new file mode 100644 index 00000000000..e883f1258ee --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt @@ -0,0 +1,6 @@ +interface IBase + +typealias B = IBase + +class Test1 : B +class Test2 : IBase, B diff --git a/compiler/testData/diagnostics/tests/typealias/inSupertypesList.txt b/compiler/testData/diagnostics/tests/typealias/inSupertypesList.txt new file mode 100644 index 00000000000..d511347179f --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/inSupertypesList.txt @@ -0,0 +1,23 @@ +package + +public typealias B = IBase + +public interface IBase { + 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 open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class Test1 : B [= IBase] { + public constructor Test1() + 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 open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class Test2 : IBase, B [= IBase] { + public constructor Test2() + 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 open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index c1ebdb1c49f..4e06aac98a9 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -19026,6 +19026,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/typealias"), Pattern.compile("^(.+)\\.kt$"), true); } + @TestMetadata("inSupertypesList.kt") + public void testInSupertypesList() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt"); + doTest(fileName); + } + @TestMetadata("parameterRestrictions.kt") public void testParameterRestrictions() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/typealias/parameterRestrictions.kt");