Quick fix for deprecated async syntax

This commit is contained in:
Nikolay Krasko
2015-12-19 19:18:22 +03:00
committed by Andrey Breslav
parent 01095bc652
commit afc1e24571
15 changed files with 202 additions and 9 deletions
+20
View File
@@ -76,3 +76,23 @@ val x = C() willBeInfix 1
fun infixTest() {
arrayListOf(1, 2, 3) map { it }
}
fun async(f: () -> Unit) {}
infix fun Any.async(f: () -> Unit) {}
fun test(foo: Any) {
async { }
async /**/ { }
foo async { }
async() { }
async({ })
foo async ({ })
foo async fun () {}
foo async (fun () {})
async (fun () {})
}
+20
View File
@@ -75,3 +75,23 @@ val x = C() willBeInfix 1
fun infixTest() {
arrayListOf(1, 2, 3).map { it }
}
fun async(f: () -> Unit) {}
infix fun Any.async(f: () -> Unit) {}
fun test(foo: Any) {
async() { }
async() /**/ { }
foo async ({ })
async() { }
async({ })
foo async ({ })
foo async (fun () {})
foo async (fun () {})
async (fun () {})
}