Files
kotlin-fork/analysis/analysis-api/testData/annotations/annotationsOnDeclaration/direct/emptyJavaSpreadParameter.kt
T
Justin Paupore 212baf580c [AA-FIR] Fix handling of Java annotation parameters.
This changes FirAnnotationValueConverter to no longer rely on PSI
information when projecting annotation parameter information to AA.
For annotations defined in Java, including many meta-annotations, PSI
information is not available for the annotation. This caused those
annotation values to be projected as KtUnsupportedAnnotationValue.

Instead of using PSI information, this changes
FirAnnotationValueConverter to use the tree structure instead. Spread
and named parameter arguments are spliced into the parameter list of
their surrounding vararg calls, meaning that callers see the expected
structure. (See the varargSpreadParameter.kt test file for an example.)
2023-01-12 19:48:21 +09:00

10 lines
172 B
Kotlin
Vendored

// FILE: A.java
public @interface A {
String[] value() default {"foo", "bar"};
}
// FILE: Test.kt
annotation class B(vararg val a: A)
@B(A(), A(*[]))
class <caret>Foo