RFR: 8303784: no- at Target annotations should be applicable to type parameter declarations [v3]
Vicente Romero
vromero at openjdk.org
Thu Mar 23 03:46:43 UTC 2023
On Tue, 21 Mar 2023 18:11:24 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
>> Please consider this fix for https://bugs.openjdk.org/browse/JDK-8303784, which make `@Target`-less annotations applicable to type parameter declarations.
>>
>> `@Target`-less annotations are applicable to 'all declaration contexts', which includes type parameter declarations.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>
> Make fix contingent on --release 14
>
> based on discussion in CSR.
looks good, added a minor suggestion
test/langtools/tools/javac/annotations/typeAnnotations/NoTargetOnTypeParameterDeclaration.java line 29:
> 27: * @summary no- at Target annotations should be applicable to type parameter declarations
> 28: * @compile/fail/ref=NoTargetOnTypeParameterDeclaration.out --release 13 -XDrawDiagnostics NoTargetOnTypeParameterDeclaration.java
> 29: * @compile --release 14 NoTargetOnTypeParameterDeclaration.java
suggestion: you could add another command to compile the source with no `--release` option so that the behavior is checked for current and future releases too
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/12914#pullrequestreview-1353793145
PR Review Comment: https://git.openjdk.org/jdk/pull/12914#discussion_r1145639123
More information about the compiler-dev
mailing list