K2: add test for already fixed missing diagnostic issue

#KT-55956
This commit is contained in:
Ilya Chernikov
2023-07-18 15:48:28 +02:00
committed by Space Team
parent 4b7234d27e
commit 85ca5294ef
6 changed files with 52 additions and 0 deletions
@@ -0,0 +1,22 @@
// FIR_IDENTICAL
// TARGET_BACKEND: JVM_IR
<!WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET!>@file:MyExperimentalAPI<!>
@RequiresOptIn
@Target(AnnotationTarget.CLASS)
annotation class MyExperimentalAPI
@MyExperimentalAPI
class Some {
fun foo() {}
}
class Bar {
@OptIn(MyExperimentalAPI::class)
fun bar() {
Some().foo()
}
}
fun main(args: Array<String>) {}