Skip to content

operator== only checks the generic type #15

Description

@enetor

Current implementation of operator== checks the generic type instead of the parameterized type. For example:

class Tuple2<T1, T2> {
  @override
  bool operator ==(other) =>
      other is Tuple2 &&
      other.item1 == item1 &&
      other.item2 == item2;

What is the reason for not checking the parameterized type?

other is Tuple2<T1, T2>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions