Open JarvisCraft opened 3 years ago
This would be nice for other annotations like @MagicConstant
, @Pattern
, @RegExp
, and @Subst
as well, but I think it's intentional since all these annotations are in the org.intellij.annotations
package (or maybe because they're old annotations).
Description
@Target
ElementType.TYPE_USE
may be added to@Language
annotation to allow its usage in applicablecontexts.Example
Currently the following example won't compile although it is logical:
Another positive side is that while currently IntelliJ warns on incorrect order in the following case:
suggesting swapping of
final
and@Language("json")
, this wouldn't be true ifTYPE_USE
was present on the annotation.