From dbc0ebd86131be754ebf8e4d295cfef560d20008 Mon Sep 17 00:00:00 2001 From: "Denis.Zharkov" Date: Tue, 27 Apr 2021 17:48:37 +0300 Subject: [PATCH] FIR: Update test data changed INAPPLICABLE_CANDIDATE -> ARGUMENT_TYPE_MISMATCH --- .../diagnostics/tests/FunctionCalleeExpressions.fir.kt | 4 ++-- .../tests/annotations/annotationRenderingInTypes.fir.kt | 2 +- .../tests/functionAsExpression/MissingParameterTypes.fir.kt | 4 ++-- .../functionLiterals/destructuringInLambdas/simple.fir.kt | 4 ++-- .../destructuringInLambdas/underscore.fir.kt | 4 ++-- .../tests/functionLiterals/missedTypeMismatch.fir.kt | 4 ++-- compiler/testData/diagnostics/tests/generics/kt34729.fir.kt | 4 ++-- .../testData/diagnostics/tests/regressions/kt32792.fir.kt | 6 +++--- .../regression/kt9820_javaFunctionTypeInheritor.fir.kt | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt index cef9a56ac42..eeda3af3a2d 100644 --- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt +++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.fir.kt @@ -40,8 +40,8 @@ fun main(args : Array) { foo2()({}) foo2(){} (foo2()){} - (foo2()){x -> } - foo2()({x -> }) + (foo2()){x -> } + foo2()({x -> }) val a = fooT1(1)() checkSubtype(a) diff --git a/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt b/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt index aa1e4d17c51..a34cd9ef536 100644 --- a/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/annotations/annotationRenderingInTypes.fir.kt @@ -23,4 +23,4 @@ var test3: Int = 0 fun f4(fn: (@Ann Int, @Ann Int) -> Unit) {} -val test4 = f4 { single -> } +val test4 = f4 { single -> } diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.fir.kt b/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.fir.kt index 826a1679ed7..0df064a4054 100644 --- a/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.fir.kt +++ b/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.fir.kt @@ -19,9 +19,9 @@ fun test1(a: (Int) -> Unit) { } fun test2(a: (Int) -> Unit) { - test2(fun (x: String) {}) + test2(fun (x: String) {}) } fun test3(a: (Int, String) -> Unit) { - test3(fun (x: String) {}) + test3(fun (x: String) {}) } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.fir.kt index 9e5d80c551f..30bb8a69f4f 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.fir.kt @@ -47,8 +47,8 @@ fun bar() { b checkType { _() } } - foo { (a, b): B -> + foo { (a, b): B -> a checkType { _() } b checkType { _() } - } + } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.fir.kt index 5cd7d359a56..0f01f99fbf8 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.fir.kt @@ -56,8 +56,8 @@ fun bar() { b checkType { _() } } - foo { (_, b): B -> + foo { (_, b): B -> _.hashCode() b checkType { _() } - } + } } diff --git a/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt b/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt index 2f707ce03a3..7136e06bb9e 100644 --- a/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt +++ b/compiler/testData/diagnostics/tests/functionLiterals/missedTypeMismatch.fir.kt @@ -20,8 +20,8 @@ fun main() { val a8: () -> Int = fun(): String = "1" val a9: () -> () -> () -> Int = fun(): () -> () -> String = fun(): () -> String = fun(): String = "1" - foo(fun(): String = "1") - foo(((fun(): String = "1"))) + foo(fun(): String = "1") + foo(((fun(): String = "1"))) val a10: Int.(String) -> Int = fun (x: String) = 10 val a11: () -> () -> () -> Int = fun() = fun() = fun(): String = "1" diff --git a/compiler/testData/diagnostics/tests/generics/kt34729.fir.kt b/compiler/testData/diagnostics/tests/generics/kt34729.fir.kt index de5f7d6f060..81507bb416f 100644 --- a/compiler/testData/diagnostics/tests/generics/kt34729.fir.kt +++ b/compiler/testData/diagnostics/tests/generics/kt34729.fir.kt @@ -14,6 +14,6 @@ fun bar(a: (Int) -> T) { } fun test() { - foo { } - bar { } + foo { } + bar { } } diff --git a/compiler/testData/diagnostics/tests/regressions/kt32792.fir.kt b/compiler/testData/diagnostics/tests/regressions/kt32792.fir.kt index d426a562895..d74ac248b30 100644 --- a/compiler/testData/diagnostics/tests/regressions/kt32792.fir.kt +++ b/compiler/testData/diagnostics/tests/regressions/kt32792.fir.kt @@ -4,7 +4,7 @@ inline fun tryLambdas(lamb : () -> T) : T{ return lamb.invoke() } fun main() { - tryLambdas { - return@tryLambdas - } + tryLambdas { + return@tryLambdas + } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.fir.kt index 1762e31b6d7..f03f4c96a20 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/regression/kt9820_javaFunctionTypeInheritor.fir.kt @@ -14,5 +14,5 @@ fun useJ(j: J) { } fun jj() { - useJ({}) + useJ({}) }