K2: reproduce KT-61691
This commit is contained in:
committed by
Space Team
parent
aacfc31c90
commit
91aa679214
+22
@@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
+22
@@ -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) {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user