Skip to content

unnecessary_parenthesis not detected around literals and simple identifiers #59144

Closed

Description

@oprypin

These unnecessary parentheses should be dropped, but they are not reported:

void f() {
  final a1 = '' + ('');
  final a2 = (a1.length) * 2;
  final a3 = ((a1.isEmpty), 2);
  final a4 = (1, (2));
}

Activity

  1. added
    P3A lower priority bug or feature request
    on May 15, 2023
  2. added
    type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
    on Mar 29, 2024
  3. self-assigned this
    on Jul 19, 2024
  4. srawlins commented on Oct 12, 2024

    @srawlins
    Member

    Fixed by a186457

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestdevexp-linterIssues with the analyzer's support for the linter packagelegacy-area-analyzerUse area-devexp instead.linter-false-negativeIssues related to lint rules that fail to report a problem.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions