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