You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that JDT went ahead and implemented the spec change https://bugs.openjdk.org/browse/JDK-8231435 eagerly.
It also appears that javac never implemented this change as can be seen from this snippet
@interface Simple {}
class Test { <@Simple T> void m(T arg1) {} }
being rejected by javac 14-20 with the diagnostic
X.java:2: error: annotation @Simple not applicable in this type context
class Test { <@Simple T> void m(T arg1) {} }
^
1 error
...
If an annotation of type java.lang.annotation.Target is not present on the
declaration of an annotation interface A, then A is applicable in all declaration
contexts and in no type contexts.
...
The text was updated successfully, but these errors were encountered:
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=552082
It appears that JDT went ahead and implemented the spec change https://bugs.openjdk.org/browse/JDK-8231435 eagerly.
It also appears that javac never implemented this change as can be seen from this snippet
being rejected by javac 14-20 with the diagnostic
Now JLS has changed course with https://bugs.openjdk.org/browse/JDK-8261610 and javac also is implementing https://bugs.openjdk.org/browse/JDK-8303784
Current reading of JLS 9.6.4.1 :
The text was updated successfully, but these errors were encountered: