Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/experimental/overrideInAnonymousObject.kt
T
2021-06-08 11:37:26 +03:00

24 lines
402 B
Kotlin
Vendored

// FIR_IDENTICAL
// !USE_EXPERIMENTAL: 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() {}
}