-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P3
-
Affects Version/s: 15
-
Component/s: tools
-
b15
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