Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @Nullable annotation to fields #28

Open
parttimenerd opened this issue Aug 27, 2024 · 0 comments
Open

Add @Nullable annotation to fields #28

parttimenerd opened this issue Aug 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@parttimenerd
Copy link
Owner

Idea: Add @Nullable to return types of methods like the map methods and enforce null-check in the Java compiler plugin.

@Nullable Ptr<X> func(...):

Requires

var ptr = func(...);
if (ptr == null) {
  ...
}

pattern (or that the return value of func is not assigned).

@parttimenerd parttimenerd added the enhancement New feature or request label Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant