FIR checker: make unused checker visit qualified accesses in annotations

#KT-43687 Fixed
This commit is contained in:
Jinseong Jeon
2020-12-01 14:19:22 -08:00
committed by Mikhail Glukhikh
parent 5efe774dba
commit 148d540580
5 changed files with 71 additions and 13 deletions
@@ -0,0 +1,7 @@
annotation class Ann(val value: Int)
fun foo(): Int {
val x = 3
@Ann(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>x<!>) val y = 5
return y
}
@@ -0,0 +1,15 @@
FILE: usedInAnnotationArguments.kt
public final annotation class Ann : R|kotlin/Annotation| {
public constructor(value: R|kotlin/Int|): R|Ann| {
super<R|kotlin/Any|>()
}
public final val value: R|kotlin/Int| = R|<local>/value|
public get(): R|kotlin/Int|
}
public final fun foo(): R|kotlin/Int| {
lval x: R|kotlin/Int| = Int(3)
@R|Ann|(R|<local>/x|) lval y: R|kotlin/Int| = Int(5)
^foo R|<local>/y|
}