As we've started adding more and more "annotations" to painless's method whitelist we're bumping into the need for annotations to validate things. Mostly its that some annotations only fit on certain kinds of methods. The @compile_time_only annotation that we added in #68088 can only go on from_class imported method and instant bindings and can't go on regular methods or augmentations, for example. But there are likely lots of examples I haven't thought of. For our own sanity, we need to make it easier to annotations to validate themselves.
As we've started adding more and more "annotations" to painless's method whitelist we're bumping into the need for annotations to validate things. Mostly its that some annotations only fit on certain kinds of methods. The
@compile_time_only
annotation that we added in #68088 can only go onfrom_class
imported method and instant bindings and can't go on regular methods or augmentations, for example. But there are likely lots of examples I haven't thought of. For our own sanity, we need to make it easier to annotations to validate themselves.