AA FIR: handle Java annotation vararg values

This commit is contained in:
Jinseong Jeon
2022-11-15 23:26:40 -08:00
committed by Ilya Kirillov
parent a0f4c674f5
commit 6caf384bad
8 changed files with 57 additions and 0 deletions
@@ -0,0 +1,3 @@
KtDeclaration: KtProperty foo
annotations: [
]
@@ -0,0 +1,21 @@
// FILE: JavaAnno.java
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
@Target({FIELD, METHOD})
public @interface JavaAnno() {
ElementType[] types();
}
// FILE: test.kt
import java.lang.annotation.ElementType.FIELD
class Test {
@JavaAnno(FIELD)
val f<caret>oo = ""
}
@@ -0,0 +1,5 @@
KtDeclaration: KtProperty foo
annotations: [
JavaAnno(types = java.lang.annotation.ElementType.FIELD)
psi: KtAnnotationEntry
]