FIR: use expected type for lambda return statements if possible

This commit is contained in:
pyos
2023-01-02 11:37:38 +01:00
committed by Dmitriy Novozhilov
parent 1eccb9aea1
commit 5e8591d61d
10 changed files with 60 additions and 17 deletions
@@ -27,7 +27,7 @@ fun testResultOfAnonFun2() =
fun testReturnFromAnonFun() =
run(fun () {
return <!ARGUMENT_TYPE_MISMATCH, RETURN_TYPE_MISMATCH!>if (true) 42 else println()<!>
return if (true) 42 else println()
})
fun <!IMPLICIT_NOTHING_RETURN_TYPE!>testReturn1<!>() =