Details
-
Bug
-
Resolution: Fixed
-
P3
-
15
-
b15
Description
this code:
import java.lang.annotation.*;
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR})
@Retention(RetentionPolicy.RUNTIME)
@interface Ann {
}
record R(@Ann String str) {
R {}
}
is rejected by the compiler even when the annotation is applicable to fields.
reported by Tagir on amber-dev:
https://mail.openjdk.java.net/pipermail/amber-dev/2020-August/006516.html
import java.lang.annotation.*;
@Target({ElementType.FIELD, ElementType.CONSTRUCTOR})
@Retention(RetentionPolicy.RUNTIME)
@interface Ann {
}
record R(@Ann String str) {
R {}
}
is rejected by the compiler even when the annotation is applicable to fields.
reported by Tagir on amber-dev:
https://mail.openjdk.java.net/pipermail/amber-dev/2020-August/006516.html