<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">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>