google / google/tuple.dart

operator== only checks the generic type

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
question
Dominant language
Dart
Stars
195
Forks
25
PR merge metrics
No merged PRs in 30d

Description

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

```dart
class Tuple2 {
@override
bool operator ==(other) =>
other is Tuple2 &&
other.item1 == item1 &&
other.item2 == item2;
```

What is the reason for not checking the parameterized type?

```dart
other is Tuple2
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.