Do not allow to use suspend functions in 1.0.6+

This commit is contained in:
Alexander Udalov
2017-01-11 16:34:36 +03:00
parent 4dd100122b
commit e3f4b6e77e
4 changed files with 172 additions and 4 deletions
+16
View File
@@ -0,0 +1,16 @@
package test
suspend fun topLevel() {}
class Foo {
constructor(block: suspend () -> Unit)
suspend fun member() {}
}
fun async1(block: suspend () -> Unit) {}
fun (suspend () -> Unit).async2() {}
fun async3(): suspend () -> Unit = null!!
fun async4(): Map<Int, suspend () -> Unit>? = null
val (suspend () -> Unit).asyncVal: () -> Unit get() = {}