From 83c90d0e4f1069402009f137a680bffacbae8903 Mon Sep 17 00:00:00 2001 From: "Aleksandra.Arsenteva" Date: Mon, 13 Nov 2023 12:07:18 +0300 Subject: [PATCH] Add one more test for KT-61959 Generate FE tests --- ...cCompilerTestFE10TestdataTestGenerated.java | 6 ++++++ ...osticCompilerFE10TestDataTestGenerated.java | 6 ++++++ ...reeOldFrontendDiagnosticsTestGenerated.java | 6 ++++++ ...PsiOldFrontendDiagnosticsTestGenerated.java | 6 ++++++ .../outerTypeParameterAsSupertype.kt | 18 ++++++++++++++++++ .../test/runners/DiagnosticTestGenerated.java | 6 ++++++ 6 files changed, 48 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java index 905e3f4b64a..79ea63c8468 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/DiagnosticCompilerTestFE10TestdataTestGenerated.java @@ -37192,6 +37192,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt"); } + @Test + @TestMetadata("outerTypeParameterAsSupertype.kt") + public void testOuterTypeParameterAsSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt"); + } + @Test @TestMetadata("propertyTypeParameters.kt") public void testPropertyTypeParameters() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java index 7207ec06cf9..a445f814ddc 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated.java @@ -37192,6 +37192,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt"); } + @Test + @TestMetadata("outerTypeParameterAsSupertype.kt") + public void testOuterTypeParameterAsSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt"); + } + @Test @TestMetadata("propertyTypeParameters.kt") public void testPropertyTypeParameters() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java index 94582629109..d1f1a2f235a 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirLightTreeOldFrontendDiagnosticsTestGenerated.java @@ -35078,6 +35078,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt"); } + @Test + @TestMetadata("outerTypeParameterAsSupertype.kt") + public void testOuterTypeParameterAsSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt"); + } + @Test @TestMetadata("propertyTypeParameters.kt") public void testPropertyTypeParameters() throws Exception { diff --git a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java index df179ab23b4..d59f580174b 100644 --- a/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/FirPsiOldFrontendDiagnosticsTestGenerated.java @@ -35198,6 +35198,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt"); } + @Test + @TestMetadata("outerTypeParameterAsSupertype.kt") + public void testOuterTypeParameterAsSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt"); + } + @Test @TestMetadata("propertyTypeParameters.kt") public void testPropertyTypeParameters() throws Exception { diff --git a/compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt b/compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt new file mode 100644 index 00000000000..1cbb0395f30 --- /dev/null +++ b/compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt @@ -0,0 +1,18 @@ +// FIR_IDENTICAL + +package test + +interface OuterParam + +class A: OuterParam + +class Outer { + + class Nested: OuterParam { + fun foo(): OuterParam = A() + } +} + +fun main() { + val c: OuterParam = Outer.Nested().foo() +} \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java index e634dd46a7b..6ffb168c41f 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/DiagnosticTestGenerated.java @@ -37192,6 +37192,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsBound.kt"); } + @Test + @TestMetadata("outerTypeParameterAsSupertype.kt") + public void testOuterTypeParameterAsSupertype() throws Exception { + runTest("compiler/testData/diagnostics/tests/typeParameters/outerTypeParameterAsSupertype.kt"); + } + @Test @TestMetadata("propertyTypeParameters.kt") public void testPropertyTypeParameters() throws Exception {