fbcde11b04
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.
23 lines
478 B
Kotlin
Vendored
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 = ""
|
|
}
|