FIR: Update test data (suspicious diagnostic on return statement)

There should be errors, but different: cannot infer parameter type

^KT-46422 Relates
This commit is contained in:
Denis.Zharkov
2021-04-27 18:25:12 +03:00
committed by teamcityserver
parent 00821bbc63
commit 7c5c744e87
3 changed files with 11 additions and 11 deletions
@@ -5,10 +5,10 @@ fun <T, R : Any> foo(body: (R?) -> T): T = fail()
fun test1() { fun test1() {
foo { foo {
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
foo { x -> foo { x ->
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
} }
@@ -17,10 +17,10 @@ fun <T, R> bar(body: (R) -> T): T = fail()
fun test2() { fun test2() {
bar { bar {
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
bar { x -> bar { x ->
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
} }
@@ -28,10 +28,10 @@ fun <T, R> baz(body: (List<R>) -> T): T = fail()
fun test3() { fun test3() {
baz { baz {
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
baz { x -> baz { x ->
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
} }
@@ -39,10 +39,10 @@ fun <T, R : Any> brr(body: (List<R?>) -> T): T = fail()
fun test4() { fun test4() {
brr { brr {
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
brr { x -> brr { x ->
true <!ARGUMENT_TYPE_MISMATCH!>true<!>
} }
} }
@@ -6,7 +6,7 @@ fun <T, R> foo(block: (T)-> R) = block
fun test1() { fun test1() {
foo { foo {
x -> // here we have 'cannot infer parameter type' error x -> // here we have 'cannot infer parameter type' error
43 <!ARGUMENT_TYPE_MISMATCH!>43<!>
} }
} }
@@ -16,11 +16,11 @@ val foo: Foo = run {
val foofoo: Foo = run { val foofoo: Foo = run {
val x = foo() val x = foo()
if (x == null) throw Exception() if (x == null) throw Exception()
x <!ARGUMENT_TYPE_MISMATCH!>x<!>
} }
val bar: Bar = run { val bar: Bar = run {
val x = foo() val x = foo()
if (x == null) throw Exception() if (x == null) throw Exception()
x <!ARGUMENT_TYPE_MISMATCH!>x<!>
} }