A version bump will be committed separately if this PR is accepted.
Currently IDEA already recognizes this annotation in fields and method return values. We use it as external for a year or so. I think it's perfectly ok to publish it, so users could annotate their own methods, gaining the benefits from better static analysis after that. We can separately discuss whether default values should be added to from and/or to. AFAIK adding default values later is both source and binary compatible change.
@chashnikov please review!
A version bump will be committed separately if this PR is accepted.
Currently IDEA already recognizes this annotation in fields and method return values. We use it as external for a year or so. I think it's perfectly ok to publish it, so users could annotate their own methods, gaining the benefits from better static analysis after that. We can separately discuss whether default values should be added to
from
and/orto
. AFAIK adding default values later is both source and binary compatible change.