[FIR] Add a test for KT-55933
This commit is contained in:
committed by
Space Team
parent
da60be06a0
commit
4f0563dee1
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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")
|
||||
Generated
+6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user