Skip to content

unnecessary_parenthesis false positive with records #59035

Closed
dart-archive/linter
#4074
@asashour

Description

@asashour
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.

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresdevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.linter-new-language-featuretype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions