Skip to content

use_late_for_private_fields_and_variables should have tests with patterns #59083

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

Closed
srawlins opened this issue Mar 21, 2023 · 0 comments · Fixed by dart-archive/linter#4209
Closed
Assignees
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-negative linter-new-language-feature P2 A bug or feature request we're likely to work on
Milestone

Comments

@srawlins
Copy link
Member

srawlins commented Mar 21, 2023

Child issue of #58837

I think there should be a test case with an assignment pattern like:

int? _i;
m() {
  _i?.abs();
  (_i, ) = (null, );
}

in which the lint rule would allow that _i can be nullable, as it is assigned null, in a pattern.

@pq pq added this to the Dart 3 beta 3 milestone Mar 21, 2023
@pq pq added linter-new-language-feature linter-false-negative P2 A bug or feature request we're likely to work on labels Mar 21, 2023
@pq pq self-assigned this Mar 23, 2023
@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 19, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-negative linter-new-language-feature P2 A bug or feature request we're likely to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants