K2: add proper catch parameter annotation targeting

In this commit we begin counting a catch parameter as
both a local variable and a value parameter for the purpose
of annotation targeting.

#KT-61691 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-09-12 18:48:12 +02:00
committed by Space Team
parent 91aa679214
commit ffd77850ef
3 changed files with 8 additions and 6 deletions
@@ -16,7 +16,7 @@ annotation class FixCatchClass
fun main() {
try {
} catch (@FixCatchLocalVariable <!WRONG_ANNOTATION_TARGET!>@FixCatchValueParameter<!> <!WRONG_ANNOTATION_TARGET!>@FixCatchClass<!> e: Throwable) {
} catch (@FixCatchLocalVariable @FixCatchValueParameter <!WRONG_ANNOTATION_TARGET!>@FixCatchClass<!> e: Throwable) {
}
}