Introduce basic suspend conversion in FE

#KT-15917 In Progress
This commit is contained in:
Mikhail Zarechenskiy
2020-04-22 04:30:58 +03:00
parent 9e04ebdace
commit 537a59d6ca
23 changed files with 388 additions and 6 deletions
@@ -0,0 +1,11 @@
// !LANGUAGE: +SuspendConversion
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(f: () -> String, g: suspend () -> String, h: suspend () -> String) {}
fun test(f: () -> String, g: suspend () -> String) {
<!INAPPLICABLE_CANDIDATE!>foo<!>(f, f, f)
<!INAPPLICABLE_CANDIDATE!>foo<!>(f, { "str" }, f)
<!INAPPLICABLE_CANDIDATE!>foo<!>(f, f, g)
foo(f, g, g)
}