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 6308f22e159..29d96f4f838 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 @@ -213,6 +213,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt"); } + @Test + @TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt") + public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception { + runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt"); + } + @Test @TestMetadata("compilerCrashParameterType.kt") public void testCompilerCrashParameterType() 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 06cae386e96..17b02721461 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 @@ -213,6 +213,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt"); } + @Test + @TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt") + public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception { + runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt"); + } + @Test @TestMetadata("compilerCrashParameterType.kt") public void testCompilerCrashParameterType() 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 aa34f698412..dec2523b951 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 @@ -213,6 +213,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt"); } + @Test + @TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt") + public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception { + runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt"); + } + @Test @TestMetadata("compilerCrashParameterType.kt") public void testCompilerCrashParameterType() 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 62293040ae8..8e9b59f1f8e 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 @@ -213,6 +213,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt"); } + @Test + @TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt") + public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception { + runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt"); + } + @Test @TestMetadata("compilerCrashParameterType.kt") public void testCompilerCrashParameterType() throws Exception { diff --git a/compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.fir.kt b/compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.fir.kt new file mode 100644 index 00000000000..5504142bf37 --- /dev/null +++ b/compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.fir.kt @@ -0,0 +1,11 @@ +// ISSUE: KT-64644 +// WITH_STDLIB + +typealias MaybePair = Pair? + +fun MaybePair> foo(x: T) { + if (x != null) { + println(x.first) + println(x.second) + } +} diff --git a/compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt b/compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt new file mode 100644 index 00000000000..d1364381663 --- /dev/null +++ b/compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt @@ -0,0 +1,11 @@ +// ISSUE: KT-64644 +// WITH_STDLIB + +typealias MaybePair = Pair? + +fun foo(x: T) { + if (x != null) { + println(x.first) + println(x.second) + } +} 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 a3fe29397c6..2190ba53ce8 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 @@ -213,6 +213,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { runTest("compiler/testData/diagnostics/tests/comparisonOfGenericInterfaceWithGenericClass.kt"); } + @Test + @TestMetadata("compilerCrashInTypeParameterBoundsChecker.kt") + public void testCompilerCrashInTypeParameterBoundsChecker() throws Exception { + runTest("compiler/testData/diagnostics/tests/compilerCrashInTypeParameterBoundsChecker.kt"); + } + @Test @TestMetadata("compilerCrashParameterType.kt") public void testCompilerCrashParameterType() throws Exception {