Files
kotlin-fork/compiler/testData/versionRequirement/nestedClassMembers.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

31 lines
570 B
Kotlin
Vendored

@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
package test
import kotlin.internal.RequireKotlin
class Outer {
inner class Inner {
@RequireKotlin("1.3")
inner class Deep @RequireKotlin("1.3") constructor() {
@RequireKotlin("1.3")
fun f() {}
@RequireKotlin("1.3")
val x = ""
suspend fun s() {}
}
}
class Nested {
@RequireKotlin("1.3")
fun g() {}
}
@RequireKotlin("1.3")
companion object
}
@RequireKotlin("1.3")
fun topLevel() {}