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

Lint local variables with the type inferred void #1134

Open
MichaelRFairhurst opened this issue Aug 17, 2018 · 0 comments
Open

Lint local variables with the type inferred void #1134

MichaelRFairhurst opened this issue Aug 17, 2018 · 0 comments
Labels
lint-request P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug type-question A question about expected behavior or functionality

Comments

@MichaelRFairhurst
Copy link
Contributor

Should this be part of void_checks?

See dart-lang/sdk#34171

Basically,

final x = list.removeWhere(...);

is legal, but x is an unusable variable, so it doesn't really have a point. It's better to lint "list.removeWhere() returns void so it should not be assigned to a variable, which will be unusable." or something.

@srawlins srawlins added lint-request type-question A question about expected behavior or functionality labels Dec 29, 2018
@srawlins srawlins added the P3 A lower priority bug or feature request label Oct 11, 2022
@srawlins srawlins added the type-enhancement A request for a change that isn't a bug label Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lint-request P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug type-question A question about expected behavior or functionality
Projects
None yet
Development

No branches or pull requests

2 participants