Skip to content

Warn on useless comparisons #4205

Open
@Papipo

Description

@Papipo

Hi there,

I had a typo in some code and I was comparing a variable with itself, like group_id != group_id. One of those was supposed to be group.id, and I think it's a common typo.

The idea is that the compiler is able to detect such comparisons and warn about them, since they will always evaluate to the same and are completely useless.

Thanks 🙇🏽

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions