<div dir="ltr">Hi Laird,<br><br>Nice find. I'm curious whether anyone on the list is remembering details I'm not, but this looks like a bug to me too.<br><br>I went ahead and filed: <a href="https://bugs.openjdk.org/browse/JDK-8303784">https://bugs.openjdk.org/browse/JDK-8303784</a><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 7, 2023 at 3:53 PM Laird Nelson <<a href="mailto:ljnelson@gmail.com">ljnelson@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Using Java 19:<div><br></div><div>@Retention(RetentionPolicy.RUNTIME)<br>public @interface A {}<br><br>public class B<@A C> {}<br></div><div><br></div><div>Why does javac say that A is "not applicable in this type context"? (I understand that things have changed here in various versions of the JLS and related @Target javadocs over the years so I'm probably misreading something.)</div><div><br></div><div>(Originally asked on StackOverflow with more detail: <a href="https://stackoverflow.com/questions/75667924/a-target-less-annotation-cannot-be-applied-to-a-type-parameter-declaration-in-j" target="_blank">https://stackoverflow.com/questions/75667924/a-target-less-annotation-cannot-be-applied-to-a-type-parameter-declaration-in-j</a></div><div><br></div><div>Thanks,</div><div>Laird</div></div>
</blockquote></div>