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 09b0ee50625..f7182ba2dc5 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 @@ -18053,6 +18053,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform"); } + @Test + @TestMetadata("kt61717.kt") + public void testKt61717() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt"); + } + @Test @TestMetadata("multirecursion.kt") public void testMultirecursion() 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 d3b8dbafa39..57a179f9395 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 @@ -18053,6 +18053,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform"); } + @Test + @TestMetadata("kt61717.kt") + public void testKt61717() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt"); + } + @Test @TestMetadata("multirecursion.kt") public void testMultirecursion() 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 91e0e895734..e01bd7797d8 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 @@ -18053,6 +18053,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform"); } + @Test + @TestMetadata("kt61717.kt") + public void testKt61717() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt"); + } + @Test @TestMetadata("multirecursion.kt") public void testMultirecursion() 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 a86b03a2d6a..19b0af95571 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 @@ -18059,6 +18059,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform"); } + @Test + @TestMetadata("kt61717.kt") + public void testKt61717() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt"); + } + @Test @TestMetadata("multirecursion.kt") public void testMultirecursion() throws Exception { diff --git a/compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.fir.kt b/compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.fir.kt new file mode 100644 index 00000000000..396d77068d2 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.fir.kt @@ -0,0 +1,16 @@ +// ISSUE: KT-61717 +interface Foo> { + fun bar(t: T) +} + +class FooA : Foo { + override fun bar(t: T) {} +} + +class FooB : Foo { + override fun bar(t: T) {} +} + +fun testStar(foo1: Foo<*>, foo2: Foo<*>) { + val x = foo1.bar(foo2) +} diff --git a/compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt b/compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt new file mode 100644 index 00000000000..73dbe642466 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt @@ -0,0 +1,16 @@ +// ISSUE: KT-61717 +interface Foo> { + fun bar(t: T) +} + +class FooA : Foo { + override fun bar(t: T) {} +} + +class FooB : Foo { + override fun bar(t: T) {} +} + +fun testStar(foo1: Foo<*>, foo2: Foo<*>) { + val x = foo1.bar(foo2) +} 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 18c62c9b8da..84ddf90097a 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 @@ -18059,6 +18059,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/inference/recursiveTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true); } + @Test + @TestMetadata("kt61717.kt") + public void testKt61717() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/recursiveTypes/kt61717.kt"); + } + @Test @TestMetadata("multirecursion.kt") public void testMultirecursion() throws Exception {