Files
kotlin-fork/compiler/testData/versionRequirement/suspendFun.kt
T
Alexander Udalov 7771e5914d Revert "Do not write version requirements for suspend functions"
This reverts commit 6807ed6642.

The reason is that Kotlin compilers until and including version 1.6.10
have code that detects obsolete coroutines via these version
requirements (see `versionAndReleaseCoroutinesMismatch`). Since Kotlin
1.6.10 can read metadata of version 1.7, the earliest we can drop these
version requirements is Kotlin 1.8.0.
2021-12-21 20:06:07 +01:00

17 lines
357 B
Kotlin
Vendored

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() = {}