Skip to content

False positive unrelated_type_equality_checks for certain generics cases #57962

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

Open
camsteffen opened this issue May 20, 2019 · 2 comments
Open
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-linter Issues with the analyzer's support for the linter package linter-false-positive linter-set-core P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@camsteffen
Copy link
Contributor

I found a false positive for unrelated_type_equality_checks similar to dart-archive/linter#1297 but more specific.

class Foo<T> {
  Bar<T> bar;

  bool test(Baz baz) => bar == baz; // false positive here
}

class Bar<T> {}

class Baz extends Bar<int> {}
@pq pq added linter-false-positive type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels May 20, 2019
@pq
Copy link
Member

pq commented May 20, 2019

fyi @srawlins who's fixed a bunch of issues in this one recently.

@srawlins
Copy link
Member

Hey now, I never said I enjoyed working on unrelated_type_equality_checks. 😛

@srawlins srawlins added the P3 A lower priority bug or feature request label Sep 22, 2022
@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
@bwilkerson bwilkerson added area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. and removed legacy-area-analyzer Use area-devexp instead. labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-devexp For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages. devexp-linter Issues with the analyzer's support for the linter package linter-false-positive linter-set-core P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

5 participants