Files
kotlin-fork/compiler/testData/diagnostics/tests/missingWrongAnnotationTarget.kt
T
Nikolay Lunyak 97bbf69bdc [FIR] Don't ignore annotations on when subjects
^KT-53565 Fixed
2023-08-16 08:09:14 +00:00

13 lines
265 B
Kotlin
Vendored

// FIR_IDENTICAL
// ISSUE: KT-53565
@Target(AnnotationTarget.CLASS)
annotation class InvalidAnn
fun wrongAnnotationTargetInWhenSubject() {
// Error expected on annotation
when(<!WRONG_ANNOTATION_TARGET!>@InvalidAnn<!> val x = 0) {
0 -> {}
}
}