dart-lang / mockito

Mockito-inspired mock library for Dart
https://pub.dev/packages/mockito
Apache License 2.0
623 stars 160 forks source link

Widen argument type of `Mock.operator ==` #718

Closed copybara-service[bot] closed 7 months ago

copybara-service[bot] commented 7 months ago

Widen argument type of Mock.operator ==

When mocking a class C we say Mock implements C so for this to compile Mock has to be a valid implementation of C.

This wasn't the case for classes with an overridden operator == that accepts dynamic or Object?. Widen the Mock.operator == argument's type to accomodate for this case.