Don't report EXPERIMENTAL_OVERRIDE_ERROR on annotated local functions

#KT-31728 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-05-19 16:14:52 +03:00
committed by teamcityserver
parent cb232725f0
commit 7393465696
7 changed files with 65 additions and 2 deletions
@@ -0,0 +1,23 @@
// 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() {}
}