Skip to content

unnecessary_parenthesis false positive with records #59035

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
asashour opened this issue Feb 9, 2023 · 3 comments · Fixed by dart-archive/linter#4074
Closed

unnecessary_parenthesis false positive with records #59035

asashour opened this issue Feb 9, 2023 · 3 comments · Fixed by dart-archive/linter#4074
Assignees
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-new-language-feature P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Milestone

Comments

@asashour
Copy link
Contributor

asashour commented Feb 9, 2023

const a = 1;
const b = 2;

void f(int i) {
  switch (i) {
    case const (a + b):
      break;
  }
}

There is a lint of unnecessary_parenthesis, however removing them causes a compilation error.

@srawlins
Copy link
Member

srawlins commented Feb 9, 2023

Great catch. CC @pq

@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P2 A bug or feature request we're likely to work on labels Feb 9, 2023
@pq
Copy link
Member

pq commented Feb 9, 2023

Thank you!

@pq pq self-assigned this Feb 9, 2023
@pq pq added P1 A high priority bug; for example, a single project is unusable or has many test failures linter-new-language-feature and removed P2 A bug or feature request we're likely to work on labels Feb 9, 2023
@pq pq added this to the Dart 3 beta 2 milestone Feb 9, 2023
@pq
Copy link
Member

pq commented Feb 9, 2023

See also #59037

@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-new-language-feature P1 A high priority bug; for example, a single project is unusable or has many test failures type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants