[Test] Add regression test for KT-57477
This commit is contained in:
committed by
Space Team
parent
f9785c1050
commit
a705bfe2cd
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+6
@@ -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 {
|
||||
|
||||
+12
@@ -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 {}
|
||||
}
|
||||
+12
@@ -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<!> {}
|
||||
}
|
||||
Generated
+6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user