RFR: 8303784: no- at Target annotations should be applicable to type parameter declarations [v3]
Liam Miller-Cushon
cushon at openjdk.org
Fri Mar 24 19:03:33 UTC 2023
On Fri, 24 Mar 2023 18:20:59 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 3515:
>>
>>> 3513: List<Attribute> targets = typeAnnotations.annotationTargets(a.annotationType.type.tsym);
>>> 3514: return (targets == null) ?
>>> 3515: (source.compareTo(Source.JDK14) >= 0 && isTypeParameter) :
>>
>> Usually this kind of test is done using a constant in the Feature enum; I'll let Vicente or other engineer who focuses on javac weigh in on whether or not the direct comparison is acceptable in this case.
>
> right I agree we should add a new member to the Feature enum
Will do, do you have an preferences for the name of the new constant? Maybe `NO_TARGET_ANNOTATIONS_ARE_APPLICABLE_TO_TYPE_PARAMETER_DECLARATIONS`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/12914#discussion_r1147959011
More information about the compiler-dev
mailing list