[FIR] KT-54260: Fix the compiler crash

AllOpen plugin makes the properties all-open, but the annotation class
is left closed, because allopen for k2 literally checks
`classKind == CLASS`.

Since the properties are open, a
`NON_FINAL_MEMBER_IN_FINAL_CLASS` diagnostic is reported for them. It's
positioning strategy seeks for the explicit `open` modifier which is
not present.

The added test should not crash the compiler.

^KT-54260 Fixed
This commit is contained in:
Nikolay Lunyak
2022-11-17 10:54:34 +02:00
committed by teamcity
parent c79d65536b
commit 4b3dc008f0
7 changed files with 185 additions and 50 deletions
+10
View File
@@ -0,0 +1,10 @@
// FIR_IDENTICAL
// WITH_STDLIB
annotation class AllOpen
@AllOpen
annotation class ConsoleCommands(
val <!NON_FINAL_MEMBER_IN_FINAL_CLASS!>value<!>: String = "",
val <!NON_FINAL_MEMBER_IN_FINAL_CLASS!>scope<!>: String
)