[FIR] Don't perform suspend conversion for anonymous functions

^KT-58329 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-04-28 15:51:25 +03:00
committed by Space Team
parent f6f85eeb88
commit cc6c378b68
3 changed files with 14 additions and 5 deletions
@@ -1,7 +1,7 @@
typealias SuspendFn = suspend () -> Unit
val test1f: suspend () -> Unit = fun () {}
val test2f: suspend Any.() -> Unit = fun Any.() {}
val test1f: suspend () -> Unit = <!INITIALIZER_TYPE_MISMATCH!>fun () {}<!>
val test2f: suspend Any.() -> Unit = <!INITIALIZER_TYPE_MISMATCH!>fun Any.() {}<!>
// This is a bug in the old inference and should be fixed in new inference
// see "Fix anonymous function literals handling in type checker" for more details