Add test for KT-53343

This commit is contained in:
Mikhail Glukhikh
2022-09-12 16:45:28 +02:00
committed by Space
parent acce055fc4
commit 3848be596e
5 changed files with 35 additions and 0 deletions
@@ -6007,6 +6007,12 @@ public class DiagnosisCompilerFirTestdataTestGenerated extends AbstractDiagnosis
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("argumentTypeMismatch.kt")
public void testArgumentTypeMismatch() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/argumentTypeMismatch.kt");
}
@Test
@TestMetadata("capturedTypeInEquality.kt")
public void testCapturedTypeInEquality() throws Exception {
@@ -0,0 +1,4 @@
FILE: test.kt
public final fun main(): R|kotlin/Unit| {
Q|Sample|.<Inapplicable(INAPPLICABLE): /Sample.foo>#(String(123))
}
@@ -0,0 +1,13 @@
// FILE: Sample.java
import java.util.List;
public class Sample {
public static void foo(List<List<String>> listOfLists) {}
}
// FILE: test.kt
fun main() {
Sample.foo(<!ARGUMENT_TYPE_MISMATCH("ft<kotlin/collections/MutableList<ft<kotlin/collections/MutableList<kotlin/String!>, kotlin/collections/List<kotlin/String!>?>>, kotlin/collections/List<ft<kotlin/collections/MutableList<kotlin/String!>, kotlin/collections/List<kotlin/String!>?>>?>; kotlin/String")!>"123"<!>)
}
@@ -6007,6 +6007,12 @@ public class FirDiagnosticTestGenerated extends AbstractFirDiagnosticTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("argumentTypeMismatch.kt")
public void testArgumentTypeMismatch() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/argumentTypeMismatch.kt");
}
@Test
@TestMetadata("capturedTypeInEquality.kt")
public void testCapturedTypeInEquality() throws Exception {
@@ -6007,6 +6007,12 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true);
}
@Test
@TestMetadata("argumentTypeMismatch.kt")
public void testArgumentTypeMismatch() throws Exception {
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/problems/argumentTypeMismatch.kt");
}
@Test
@TestMetadata("capturedTypeInEquality.kt")
public void testCapturedTypeInEquality() throws Exception {