Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Feature Request] Warning for useless == #2274

@TatriX

Description

@TatriX

Hi!
Consider this code which I type by accident:

switch (state)  {
            case '#':
                state == COMMENT; // NOTE ==
}

Surely it was supposed to be state = COMMENT.
It would be cool if compiler could emit a warning, saying something like "Meaningless comparison, did you mean to use = instead of =="?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions