Test experimental coroutines version requirement on JVM only

Modify 'suspendFun' and 'nestedClassMembers' tests so that pre-release
suspend functions are tested only on JVM, where they are still supported.
This commit is contained in:
Ilya Gorbunov
2020-01-24 20:07:29 +03:00
parent 7792613f88
commit 3bd3d61469
4 changed files with 43 additions and 24 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() = {}