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:
@@ -5,12 +5,12 @@ import kotlin.internal.RequireKotlin
|
||||
|
||||
class Outer {
|
||||
inner class Inner {
|
||||
@RequireKotlin("1.1")
|
||||
inner class Deep @RequireKotlin("1.1") constructor() {
|
||||
@RequireKotlin("1.1")
|
||||
@RequireKotlin("1.3")
|
||||
inner class Deep @RequireKotlin("1.3") constructor() {
|
||||
@RequireKotlin("1.3")
|
||||
fun f() {}
|
||||
|
||||
@RequireKotlin("1.1")
|
||||
@RequireKotlin("1.3")
|
||||
val x = ""
|
||||
|
||||
suspend fun s() {}
|
||||
@@ -18,13 +18,13 @@ class Outer {
|
||||
}
|
||||
|
||||
class Nested {
|
||||
@RequireKotlin("1.1")
|
||||
@RequireKotlin("1.3")
|
||||
fun g() {}
|
||||
}
|
||||
|
||||
@RequireKotlin("1.1")
|
||||
@RequireKotlin("1.3")
|
||||
companion object
|
||||
}
|
||||
|
||||
@RequireKotlin("1.1")
|
||||
@RequireKotlin("1.3")
|
||||
fun topLevel() {}
|
||||
|
||||
@@ -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() = {}
|
||||
Reference in New Issue
Block a user