[FIR] Don't ignore annotations on when subjects

^KT-53565 Fixed
This commit is contained in:
Nikolay Lunyak
2023-08-14 15:19:36 +03:00
committed by Space Team
parent 05ed134fbb
commit 97bbf69bdc
8 changed files with 44 additions and 0 deletions
@@ -0,0 +1,12 @@
// 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 -> {}
}
}