'async' reserved in front of function literals
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
fun async(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
infix fun Any.async(f: () -> Unit) = f()
|
||||
|
||||
fun test(foo: Any) {
|
||||
<!UNSUPPORTED!>async<!> { }
|
||||
<!UNSUPPORTED!>async<!> /**/ { }
|
||||
foo <!UNSUPPORTED!>async<!> { }
|
||||
|
||||
async() { }
|
||||
|
||||
async({ })
|
||||
foo async ({ })
|
||||
|
||||
foo <!UNSUPPORTED!>async<!> fun () {}
|
||||
foo async (fun () {})
|
||||
|
||||
async (fun () {})
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
public fun async(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
|
||||
public fun test(/*0*/ foo: kotlin.Any): kotlin.Unit
|
||||
public infix fun kotlin.Any.async(/*0*/ f: () -> kotlin.Unit): kotlin.Unit
|
||||
Reference in New Issue
Block a user