// FIR_IDENTICAL @RequiresOptIn annotation class Marker @Marker interface I1 @SubclassOptInRequired(Marker::class) interface I2 // Should not be enough, and should not depend on the order of I1, I2 @SubclassOptInRequired(Marker::class) interface Impl1 : I1, I2 @SubclassOptInRequired(Marker::class) interface Impl2 : I2, I1 @Marker class C open class D { @Marker open fun bar() {} @Marker open fun baz() {} } @SubclassOptInRequired(Marker::class) open class E : D() { init { val c = C() D().bar() } fun foo() { val c = C() bar() // Error is not needed here (already reported on 'fun bar' declaration) baz() } override fun bar() { } @Marker override fun baz() { } } @SubclassOptInRequired(Marker::class) interface Foo { fun foo() = Unit } inline fun inlineFoo() { object : Foo { } } fun test() { // call site inlineFoo() }