Skip to content

Analyzer should lint if a statement consists of only an == expression #30793

@Hixie

Description

@Hixie

I would like the following to flag a lint:

void main() {
  bool a = true;
  a == false;
}

It would have caught a bug that was reported today (it's especially hard to tell that something fishy is going on when both "a" and "false" are actually much longer expressions).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions