From f296b178616c75f6eb28e5e6da5b5b6f742b3302 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Fri, 13 May 2016 14:49:52 +0300 Subject: [PATCH] KT-11588 Type aliases Additional test(s) --- .../tests/typealias/inSupertypesList.kt | 6 +++++ .../tests/typealias/inSupertypesList.txt | 23 +++++++++++++++++++ .../checkers/DiagnosticsTestGenerated.java | 6 +++++ 3 files changed, 35 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/typealias/inSupertypesList.kt create mode 100644 compiler/testData/diagnostics/tests/typealias/inSupertypesList.txt 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");