Move file annotation resolve a bit earlier #KT-51499 Fixed

This commit is contained in:
Mikhail Glukhikh
2022-04-04 11:30:04 +03:00
committed by Space
parent 899dc401c8
commit 04e8e1b2ad
3 changed files with 4 additions and 19 deletions
@@ -1,16 +0,0 @@
@file:OptIn(Marker::class)
@RequiresOptIn
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
annotation class Marker
@Marker
fun experimental() {}
interface MyInterface {
fun execute()
}
class MyClass : MyInterface {
override fun execute() = experimental()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
@file:OptIn(Marker::class)
@RequiresOptIn
@@ -12,5 +13,5 @@ interface MyInterface {
}
class MyClass : MyInterface {
override fun execute() = <!OPT_IN_USAGE_ERROR!>experimental<!>()
override fun execute() = experimental()
}