With package:analyzer version 0.33.0-alpha.0 and package:linter version 0.1.66 the unrelated_type_equality_checks is unable to recognize type compatibility correctly when the types bounds are specified using the on clause:
abstract class A {
A parent;
}
class B extends A {
}
mixin M<T extends B> on B {
void foo(T t) {
assert(t.parent == this);
// ^
// Equality operator `==` invocation with references of unrelated types.
}
}
@pq @JekCharlsonYu @stereotype441 @bwilkerson
I'm looking into this now.
Fix out for review: https://dart-review.googlesource.com/c/sdk/+/77676
I'm still seeing this on analyzer version 0.33.0 and linter version 0.1.68
nvm, was hitting a wrong version of the Dart SDK.
Most helpful comment
I'm looking into this now.