Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Include enums in unrelated_type_equality_checks #3272

Conversation

minhqdao
Copy link
Contributor

@minhqdao minhqdao commented Mar 6, 2022

Fixes comparisons of enums in unrelated_type_equality_checks.

Currently:

enum One { one }
enum Two { one }

void hello() {
  const one = One.one;
  const two = Two.one;

  if (one == two) {} // Can't be, but no lint
}

Closes dart-lang/sdk#58653.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.0006%) to 95.63% when pulling 84be139 on minhqdao:include-enums-in-unrelated-type-equality-checks into 90e8ad5 on dart-lang:master.

@srawlins
Copy link
Contributor

Great feature, thanks!

Would you mind resolving the conflict? I can check our internal code for fixed false negatives before landing this.

@srawlins srawlins added the needs-info Additional information needed from the issue author label May 22, 2023
@minhqdao
Copy link
Contributor Author

Great feature, thanks!

Would you mind resolving the conflict? I can check our internal code for fixed false negatives before landing this.

It's now been fixed here: #4282.

I think this PR and the respective issue dart-lang/sdk#58653 can be closed.

@github-actions github-actions bot removed the needs-info Additional information needed from the issue author label May 26, 2023
@srawlins
Copy link
Contributor

Thanks, you're right!

@srawlins srawlins closed this May 26, 2023
@minhqdao minhqdao deleted the include-enums-in-unrelated-type-equality-checks branch May 26, 2023 16:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linter-false-negative linter-set-core Affects a rule in the core Dart rule set
Development

Successfully merging this pull request may close these issues.

Linter allows compare different enums
4 participants