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

24 lines
392 B
Kotlin
Vendored

// FIR_IDENTICAL
// !OPT_IN: kotlin.RequiresOptIn
@RequiresOptIn
@Retention(AnnotationRetention.BINARY)
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
annotation class MyAnn
interface MyInterface {
@MyAnn
fun foo()
@MyAnn
fun bar()
}
val field = object : MyInterface {
@MyAnn
override fun foo() {}
@OptIn(MyAnn::class)
override fun bar() {}
}