Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This seems like something that we would have discussed previously, but I can't find any evidence of that.
@PolyNull
?@PolyNull
"imply"@Nullable
soon?@Nullable @PolyNull
?@PolyNull
is not? But if so, we moved away from that long ago.For now, it seems useful to at least recognize it. I could see us backtracking if we were to fall back to a policy of (at least optionally) recognizing only JSpecify annotations or only "universally" recognized annotations. But if we do so, that will involve a larger change than just reverting back this PR.
(My immediate motivation is that J2CL is looking at
@PolyNull
support (@kevinoconnor7 FYI), and we've been trying to keep our lists of annotations in sync with theirs.)Hmm, and you know, only now that I'm writing this am I realizing that making
@PolyNull
imply@Nullable
would not actually be sound, at least for the class definition of@PolyNull
. I'll leave a note on jspecify/jspecify#79 and maybe in a doc or two that we have going about@Implies
, assuming that I don't convince myself that I'm wrong by then. If I'm right, then it would actually make conceptual sense to not merge this PR, either....