mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 15:54:03 +00:00
Since we're not yet sure of the design of Experimental/UseExperimental, we're making them "experimental" themselves in some sense, in that the user is required to provide the magic argument "-Xuse-experimental=kotlin.Experimental" to be allowed to use either Experimental or UseExperimental. This is more convenient than the previous approach of "-language-version 1.3 -Xskip-metadata-version-check" because it's simpler and does not cause pre-release binaries to be produced
24 lines
318 B
Kotlin
Vendored
24 lines
318 B
Kotlin
Vendored
// !USE_EXPERIMENTAL: kotlin.Experimental
|
|
// !EXPERIMENTAL: api.ExperimentalAPI
|
|
// MODULE: api
|
|
// FILE: api.kt
|
|
|
|
package api
|
|
|
|
@Experimental
|
|
annotation class ExperimentalAPI
|
|
|
|
@ExperimentalAPI
|
|
fun function(): String = ""
|
|
|
|
// MODULE: usage(api)
|
|
// FILE: usage.kt
|
|
|
|
package usage
|
|
|
|
import api.*
|
|
|
|
fun use() {
|
|
function()
|
|
}
|