[Tests] Add test for #KT-61717
This commit is contained in:
committed by
Space Team
parent
fec2d063c1
commit
585c3fe4b5
+6
@@ -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");
|
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
|
@Test
|
||||||
@TestMetadata("multirecursion.kt")
|
@TestMetadata("multirecursion.kt")
|
||||||
public void testMultirecursion() throws Exception {
|
public void testMultirecursion() throws Exception {
|
||||||
|
|||||||
+6
@@ -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");
|
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
|
@Test
|
||||||
@TestMetadata("multirecursion.kt")
|
@TestMetadata("multirecursion.kt")
|
||||||
public void testMultirecursion() throws Exception {
|
public void testMultirecursion() throws Exception {
|
||||||
|
|||||||
+6
@@ -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");
|
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
|
@Test
|
||||||
@TestMetadata("multirecursion.kt")
|
@TestMetadata("multirecursion.kt")
|
||||||
public void testMultirecursion() throws Exception {
|
public void testMultirecursion() throws Exception {
|
||||||
|
|||||||
+6
@@ -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");
|
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
|
@Test
|
||||||
@TestMetadata("multirecursion.kt")
|
@TestMetadata("multirecursion.kt")
|
||||||
public void testMultirecursion() throws Exception {
|
public void testMultirecursion() throws Exception {
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// ISSUE: KT-61717
|
||||||
|
interface Foo<B : Foo<B>> {
|
||||||
|
fun <T : B> bar(t: T)
|
||||||
|
}
|
||||||
|
|
||||||
|
class FooA : Foo<FooA> {
|
||||||
|
override fun <T : FooA> bar(t: T) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FooB : Foo<FooB> {
|
||||||
|
override fun <T : FooB> bar(t: T) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testStar(foo1: Foo<*>, foo2: Foo<*>) {
|
||||||
|
val x = foo1.bar(<!ARGUMENT_TYPE_MISMATCH!>foo2<!>)
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// ISSUE: KT-61717
|
||||||
|
interface Foo<B : Foo<B>> {
|
||||||
|
fun <T : B> bar(t: T)
|
||||||
|
}
|
||||||
|
|
||||||
|
class FooA : Foo<FooA> {
|
||||||
|
override fun <T : FooA> bar(t: T) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
class FooB : Foo<FooB> {
|
||||||
|
override fun <T : FooB> bar(t: T) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testStar(foo1: Foo<*>, foo2: Foo<*>) {
|
||||||
|
val x = foo1.bar(foo2)
|
||||||
|
}
|
||||||
Generated
+6
@@ -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);
|
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
|
@Test
|
||||||
@TestMetadata("multirecursion.kt")
|
@TestMetadata("multirecursion.kt")
|
||||||
public void testMultirecursion() throws Exception {
|
public void testMultirecursion() throws Exception {
|
||||||
|
|||||||
Reference in New Issue
Block a user