22 lines
383 B
Plaintext
Vendored
22 lines
383 B
Plaintext
Vendored
// "Add '@OptIn(MyExperimentalAPI::class)' annotation to 'bar'" "true"
|
|
// COMPILER_ARGUMENTS: -Xopt-in=kotlin.RequiresOptIn
|
|
// WITH_RUNTIME
|
|
|
|
package a.b
|
|
|
|
@RequiresOptIn
|
|
@Target(AnnotationTarget.CLASS)
|
|
annotation class MyExperimentalAPI
|
|
|
|
@MyExperimentalAPI
|
|
class Some {
|
|
fun foo() {}
|
|
}
|
|
|
|
class Bar {
|
|
@OptIn(MyExperimentalAPI::class)
|
|
fun bar() {
|
|
Some().foo()
|
|
}
|
|
}
|