-
Notifications
You must be signed in to change notification settings - Fork 166
Fix unrelated_type_equality_checks when comparing enums #4282
Fix unrelated_type_equality_checks when comparing enums #4282
Conversation
I'd actually prefer we address mixins separately. Mixins can have superconstraints ( |
@srawlins Should I leave the "basic" Mixins handling or do you prefer them to be handled in a separate commit? |
I think even the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ Love it. I need to check internal code for new violations, then we can land.
Great, thank you! |
Internal looks clean. Will check flutter at the linter roll to the Dart SDK. |
…/linter#4282) * Fix unrelated_type_equality_checks when comparing enums * format * Fix Mixin * add test case * remove true && * add more test cases * format * remove mixin logic
Description
Currently the
unrelated_type_equality_checks
doesn't work when comparing different enums. This can be a gotcha when comparing similar enums in terms of context.Same thing happens when comparing different Mixins. Although this I've noticed when I looked into the source code of the lint.