Reserve "async* {}", extend the quick-fix

This commit is contained in:
Andrey Breslav
2015-12-21 06:52:49 +03:00
parent 45074841a4
commit a7e7d53e2b
13 changed files with 102 additions and 8 deletions
+22
View File
@@ -20,4 +20,26 @@ fun test(foo: Any) {
foo async (fun () {})
async (fun () {})
}
object async {
operator fun plus(f: () -> Unit) = f()
operator fun minus(f: () -> Unit) = f()
operator fun times(f: () -> Unit) = f()
operator fun div(f: () -> Unit) = f()
operator fun mod(f: () -> Unit) = f()
}
fun test() {
<!UNSUPPORTED!>async<!>+ {}
<!UNSUPPORTED!>async<!>- {}
<!UNSUPPORTED!>async<!>* {}
<!UNSUPPORTED!>async<!>/ {}
<!UNSUPPORTED!>async<!>% {}
async + {}
async - {}
async * {}
async / {}
async % {}
}