Skip to content

test_types_in_equals false positive #57448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexeieleusis opened this issue Feb 24, 2017 · 3 comments
Closed

test_types_in_equals false positive #57448

alexeieleusis opened this issue Feb 24, 2017 · 3 comments
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@alexeieleusis
Copy link
Contributor

bool operator ==(Object other) {
    if (other is! Foo) return false;
   ...
}
@srawlins
Copy link
Member

To clarify the example:

class Foo {
  bool b = false;
  @override
  bool operator ==(Object other) {
    if (other is! Foo) return false;
    Foo otherFoo = other as Foo;
    return otherFoo.b;
  }

  @override
  int get hashCode => 7;
}

results in a lint report on line 6.

@asashour
Copy link
Contributor

Should be closed, as discussed in dart-archive/linter#2834. With null-safety, the issue is not relevant.

@pq
Copy link
Member

pq commented Aug 2, 2021

Agreed. Thanks!

@pq pq closed this as completed Aug 2, 2021
@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants