Don't try to compare fakes to real objects

Real object comparison sometimes tries to access private
members, which are obvously missing on fakes. This
results in confusing errors.

To prevent those, just fail the comparison immediately
if one thing is a fake while the other one is not.

PiperOrigin-RevId: 571333761
diff --git a/lib/src/invocation_matcher.dart b/lib/src/invocation_matcher.dart
index 005eb05..d809c19 100644
--- a/lib/src/invocation_matcher.dart
+++ b/lib/src/invocation_matcher.dart
@@ -171,6 +171,11 @@
     if (e2 is Matcher && e1 is! Matcher) {
       return e2.matches(e1, {});
     }
+    // If one thing is a `SmartFake` but not the other, always fail.
+    // Otherwise the real thing might try calling private members on
+    // fake, and that fails at runtime with confusing errors.
+    if ((e1 is SmartFake) ^ (e2 is SmartFake)) return false;
+
     return super.equals(e1, e2);
   }