linter icon indicating copy to clipboard operation
linter copied to clipboard

False positive unrelated_type_equality_checks for certain generics cases

Open camsteffen opened this issue 6 years ago • 2 comments

I found a false positive for unrelated_type_equality_checks similar to #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> {}

camsteffen avatar May 20 '19 17:05 camsteffen

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

pq avatar May 20 '19 23:05 pq

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

srawlins avatar May 20 '19 23:05 srawlins