[FIR] Add a test for KT-55933

This commit is contained in:
Nikolay Lunyak
2023-07-05 16:12:41 +03:00
committed by Space Team
parent da60be06a0
commit 4f0563dee1
7 changed files with 54 additions and 0 deletions
@@ -63,6 +63,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("ambiguityNamedVararg.kt")
public void testAmbiguityNamedVararg() throws Exception {
runTest("compiler/testData/diagnostics/tests/ambiguityNamedVararg.kt");
}
@Test
@TestMetadata("annotationArgumentWithAliasedArrayType.kt")
public void testAnnotationArgumentWithAliasedArrayType() throws Exception {
@@ -63,6 +63,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("ambiguityNamedVararg.kt")
public void testAmbiguityNamedVararg() throws Exception {
runTest("compiler/testData/diagnostics/tests/ambiguityNamedVararg.kt");
}
@Test
@TestMetadata("annotationArgumentWithAliasedArrayType.kt")
public void testAnnotationArgumentWithAliasedArrayType() throws Exception {
@@ -63,6 +63,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("ambiguityNamedVararg.kt")
public void testAmbiguityNamedVararg() throws Exception {
runTest("compiler/testData/diagnostics/tests/ambiguityNamedVararg.kt");
}
@Test
@TestMetadata("annotationArgumentWithAliasedArrayType.kt")
public void testAnnotationArgumentWithAliasedArrayType() throws Exception {
@@ -63,6 +63,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("ambiguityNamedVararg.kt")
public void testAmbiguityNamedVararg() throws Exception {
runTest("compiler/testData/diagnostics/tests/ambiguityNamedVararg.kt");
}
@Test
@TestMetadata("annotationArgumentWithAliasedArrayType.kt")
public void testAnnotationArgumentWithAliasedArrayType() throws Exception {
@@ -0,0 +1,12 @@
// DIAGNOSTICS: -DEBUG_INFO_MISSING_UNRESOLVED
// ISSUE: KT-55933
fun swapVararg(vararg namedVararg: String, named: Int){}
fun swapVararg(named: Int, vararg namedVararg: String){}
val x = swapVararg(named = 42, namedVararg = arrayOf("1", "2"),)
fun swap(string: String, int: Int){}
fun swap(int: Int, string: String){}
val y = swap(int = 42, string = "2")
@@ -0,0 +1,12 @@
// DIAGNOSTICS: -DEBUG_INFO_MISSING_UNRESOLVED
// ISSUE: KT-55933
fun swapVararg(vararg namedVararg: String, named: Int){}
fun swapVararg(named: Int, vararg namedVararg: String){}
val x = <!OVERLOAD_RESOLUTION_AMBIGUITY!>swapVararg<!>(named = 42, namedVararg = arrayOf("1", "2"),)
fun swap(string: String, int: Int){}
fun swap(int: Int, string: String){}
val y = <!OVERLOAD_RESOLUTION_AMBIGUITY!>swap<!>(int = 42, string = "2")
@@ -63,6 +63,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("ambiguityNamedVararg.kt")
public void testAmbiguityNamedVararg() throws Exception {
runTest("compiler/testData/diagnostics/tests/ambiguityNamedVararg.kt");
}
@Test
@TestMetadata("annotationArgumentWithAliasedArrayType.kt")
public void testAnnotationArgumentWithAliasedArrayType() throws Exception {