Skip to content

Unused boolean statements #57319

Closed
Closed
@srawlins

Description

Accidental == instead of = can be caught when used as a statement.

Basically I think #11625 should be a lint rather than an analyzer warning.

void main() {
  var a = 1;
  var b = 2;
  a == 2; // lint here.
}

Metadata

Assignees

No one assigned

    Labels

    analyzer-linterIssues with the analyzer's support for the linter packagearea-analyzerUse area-analyzer for Dart analyzer issues, including the analysis server and code completion.linter-lint-requesttype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions