NI: Add regression test for KT-38799
The issue has been fixed by introducing the modified postponed arguments analysis (KT-37952)
This commit is contained in:
+5
@@ -2123,6 +2123,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/fixReceiverToMoreSpecificType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt38799.kt")
|
||||
public void testKt38799() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/kt38799.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("moreSpecificOutputType.kt")
|
||||
public void testMoreSpecificOutputType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/moreSpecificOutputType.kt");
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
|
||||
|
||||
fun main() {
|
||||
fun foo(m: Map<String, (Array<Int>) -> Unit>) {}
|
||||
fun mySort(a: Array<Int>) {}
|
||||
foo(m = mapOf(
|
||||
"mySort" to ::mySort,
|
||||
"mergeSort" to { a: Array<Int> -> }
|
||||
))
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun main(): kotlin.Unit
|
||||
+5
@@ -3138,6 +3138,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/fixReceiverToMoreSpecificType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt38799.kt")
|
||||
public void testKt38799() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/kt38799.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("moreSpecificOutputType.kt")
|
||||
public void testMoreSpecificOutputType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/moreSpecificOutputType.kt");
|
||||
|
||||
compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java
Generated
+5
@@ -3138,6 +3138,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/fixReceiverToMoreSpecificType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt38799.kt")
|
||||
public void testKt38799() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/kt38799.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("moreSpecificOutputType.kt")
|
||||
public void testMoreSpecificOutputType() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/testsWithStdLib/inference/completion/postponedArgumentsAnalysis/moreSpecificOutputType.kt");
|
||||
|
||||
Reference in New Issue
Block a user