Skip to content

void_checks should have tests with assignment patterns #59082

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 · 1 comment · Fixed by dart-archive/linter#4191
Closed

void_checks should have tests with assignment patterns #59082

srawlins opened this issue Mar 21, 2023 · 1 comment · Fixed by dart-archive/linter#4191
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 linter-set-core P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@srawlins
Copy link
Member

Child issue of #58837

I think there should be a test case like:

void f(void p) {
  (p, ) = (7, );
}

in which the lint rule would report that assigning to p violates void_checks.

Also maybe something with object patterns? like class C<T> { T f; } and case C<void>(f: var x): print('hi');...

@pq
Copy link
Member

pq commented Mar 21, 2023

Nice catch!

@pq pq self-assigned this Mar 22, 2023
@pq pq added the P1 A high priority bug; for example, a single project is unusable or has many test failures label Mar 22, 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 linter-set-core P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants