Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/experimental/experimentalIsNotEnabled.kt
T
2021-09-10 16:29:13 +03:00

26 lines
334 B
Kotlin
Vendored

// FIR_IDENTICAL
// FILE: api.kt
@<!OPT_IN_IS_NOT_ENABLED!>RequiresOptIn<!>
@Retention(AnnotationRetention.BINARY)
annotation class Marker
@Marker
fun f() {}
// FILE: usage.kt
fun use1() {
<!OPT_IN_USAGE_ERROR!>f<!>()
}
@Marker
fun use2() {
f()
}
@<!OPT_IN_IS_NOT_ENABLED!>OptIn<!>(Marker::class)
fun use3() {
f()
}