K2: reproduce KT-61691

This commit is contained in:
Mikhail Glukhikh
2023-09-08 14:22:14 +02:00
committed by Space Team
parent aacfc31c90
commit 91aa679214
7 changed files with 74 additions and 0 deletions
@@ -0,0 +1,22 @@
// WITH_STDLIB
// ISSUE: KT-61691
@Retention(AnnotationRetention.SOURCE)
@Target(AnnotationTarget.VALUE_PARAMETER)
annotation class FixCatchValueParameter
@Retention(AnnotationRetention.SOURCE)
@Target(AnnotationTarget.LOCAL_VARIABLE)
annotation class FixCatchLocalVariable
@Retention(AnnotationRetention.SOURCE)
@Target(AnnotationTarget.CLASS)
annotation class FixCatchClass
fun main() {
try {
} catch (@FixCatchLocalVariable <!WRONG_ANNOTATION_TARGET!>@FixCatchValueParameter<!> <!WRONG_ANNOTATION_TARGET!>@FixCatchClass<!> e: Throwable) {
}
}
@@ -0,0 +1,22 @@
// WITH_STDLIB
// ISSUE: KT-61691
@Retention(AnnotationRetention.SOURCE)
@Target(AnnotationTarget.VALUE_PARAMETER)
annotation class FixCatchValueParameter
@Retention(AnnotationRetention.SOURCE)
@Target(AnnotationTarget.LOCAL_VARIABLE)
annotation class FixCatchLocalVariable
@Retention(AnnotationRetention.SOURCE)
@Target(AnnotationTarget.CLASS)
annotation class FixCatchClass
fun main() {
try {
} catch (@FixCatchLocalVariable @FixCatchValueParameter @FixCatchClass e: Throwable) {
}
}