[FIR] Prohibit suspend anonymous functions in statement position
^KT-62018 Fixed ^KT-62019
This commit is contained in:
committed by
Space Team
parent
cae6e0ee0f
commit
fb00c1dfb6
+11
@@ -0,0 +1,11 @@
|
||||
// ISSUE: KT-62018, KT-62019
|
||||
|
||||
fun take(f: suspend () -> Unit) {}
|
||||
|
||||
fun test_1() {
|
||||
<!ANONYMOUS_SUSPEND_FUNCTION!>suspend<!> fun() {}
|
||||
}
|
||||
|
||||
fun test_2() {
|
||||
take(<!UNRESOLVED_REFERENCE!>suspend<!><!SYNTAX!><!> <!TOO_MANY_ARGUMENTS!>fun () {}<!>)
|
||||
}
|
||||
Reference in New Issue
Block a user