Files
kotlin-fork/analysis/analysis-api/testData/annotations/metaAnnotations/onProperty_javaAnnotation_varargParameter.kt
T
Justin Paupore fbcde11b04 [AA] Add meta-annotation test for analysis API.
This test ensures that annotations on other annotations are properly
handled, even if those annotations are defined in Java rather than in
Kotlin.

Note that this functionality only works on FIR, and currently has bugs
that mean the result is an error type. Follow-on changes will fix the
error-type bug, and restore proper functionality for FIR.
2023-01-12 19:48:21 +09:00

23 lines
478 B
Kotlin
Vendored

// 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[] value();
}
// FILE: test.kt
import java.lang.annotation.ElementType.FIELD
import java.lang.annotation.ElementType.METHOD
class Test {
@JavaAnno(FIELD, METHOD)
val f<caret>oo = ""
}