Skip to content

Change 'bool operator ==(dynamic other))' to 'bool operator ==(Object other))' #20

@sbergmair

Description

@sbergmair

While using Mockito, there exists an error after running the build_runner concerning the override of the operator.
The override that is used in this package seems to be not correct, because in object.dart of the dart language there is an abstract method like this:
external bool operator ==(Object other);
I think that's why mockito does not find the correct implementation of this override.
There was also an discussion about this: dart-lang/mockito#479

Also consider: With this implementation its ok to compare Version and null; while Object specify the compared value not to be null.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions