29c35e6686
Unless it's a usage inside the body of an effectively public inline function #KT-22759 In Progress
40 lines
772 B
Kotlin
Vendored
40 lines
772 B
Kotlin
Vendored
// !API_VERSION: 1.3
|
|
// MODULE: api
|
|
// FILE: api.kt
|
|
|
|
package api
|
|
|
|
@Experimental(Experimental.Level.WARNING, [Experimental.Impact.COMPILATION])
|
|
@Target(AnnotationTarget.FUNCTION)
|
|
annotation class CompilationExperimentalAPI
|
|
|
|
@Experimental(Experimental.Level.WARNING, [Experimental.Impact.RUNTIME])
|
|
@Target(AnnotationTarget.FUNCTION)
|
|
annotation class RuntimeExperimentalAPI
|
|
|
|
@CompilationExperimentalAPI
|
|
fun compilation() {}
|
|
|
|
@RuntimeExperimentalAPI
|
|
fun runtime() {}
|
|
|
|
// MODULE: usage(api)
|
|
// FILE: usage.kt
|
|
|
|
@file:UseExperimental(CompilationExperimentalAPI::class)
|
|
package usage
|
|
|
|
import api.*
|
|
|
|
fun use() {
|
|
compilation()
|
|
<!EXPERIMENTAL_API_USAGE!>runtime<!>()
|
|
}
|
|
|
|
class Use {
|
|
fun use() {
|
|
compilation()
|
|
<!EXPERIMENTAL_API_USAGE!>runtime<!>()
|
|
}
|
|
}
|