[Test] Add regression test for KT-57477

This commit is contained in:
Dmitriy Novozhilov
2023-03-21 16:00:40 +02:00
committed by Space Team
parent f9785c1050
commit a705bfe2cd
7 changed files with 54 additions and 0 deletions
@@ -22942,6 +22942,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/overload/kt7440.kt");
}
@Test
@TestMetadata("lambdasWithDifferentParameterNumber.kt")
public void testLambdasWithDifferentParameterNumber() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/lambdasWithDifferentParameterNumber.kt");
}
@Test
@TestMetadata("LocalFunctions.kt")
public void testLocalFunctions() throws Exception {
@@ -22942,6 +22942,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/overload/kt7440.kt");
}
@Test
@TestMetadata("lambdasWithDifferentParameterNumber.kt")
public void testLambdasWithDifferentParameterNumber() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/lambdasWithDifferentParameterNumber.kt");
}
@Test
@TestMetadata("LocalFunctions.kt")
public void testLocalFunctions() throws Exception {
@@ -22942,6 +22942,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/overload/kt7440.kt");
}
@Test
@TestMetadata("lambdasWithDifferentParameterNumber.kt")
public void testLambdasWithDifferentParameterNumber() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/lambdasWithDifferentParameterNumber.kt");
}
@Test
@TestMetadata("LocalFunctions.kt")
public void testLocalFunctions() throws Exception {
@@ -22948,6 +22948,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/overload/kt7440.kt");
}
@Test
@TestMetadata("lambdasWithDifferentParameterNumber.kt")
public void testLambdasWithDifferentParameterNumber() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/lambdasWithDifferentParameterNumber.kt");
}
@Test
@TestMetadata("LocalFunctions.kt")
public void testLocalFunctions() throws Exception {
@@ -0,0 +1,12 @@
// ISSUE: KT-57477
fun f(block: (Int) -> Unit) {}
fun f(block: (Int, Int) -> Unit) {}
fun g(block: Int.() -> Unit) {}
fun g(block: (Int, Int) -> Unit) {}
fun test() {
f {}
g {}
}
@@ -0,0 +1,12 @@
// ISSUE: KT-57477
fun f(block: (Int) -> Unit) {}
fun f(block: (Int, Int) -> Unit) {}
fun g(block: Int.() -> Unit) {}
fun g(block: (Int, Int) -> Unit) {}
fun test() {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>f<!> {}
<!OVERLOAD_RESOLUTION_AMBIGUITY!>g<!> {}
}
@@ -23690,6 +23690,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/overload/kt7440.kt");
}
@Test
@TestMetadata("lambdasWithDifferentParameterNumber.kt")
public void testLambdasWithDifferentParameterNumber() throws Exception {
runTest("compiler/testData/diagnostics/tests/overload/lambdasWithDifferentParameterNumber.kt");
}
@Test
@TestMetadata("LocalFunctions.kt")
public void testLocalFunctions() throws Exception {