Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The same hashcode of Equatables with different length lists of zeros. #74

Closed
machinescream opened this issue Jul 8, 2020 · 1 comment · Fixed by #76
Closed

The same hashcode of Equatables with different length lists of zeros. #74

machinescream opened this issue Jul 8, 2020 · 1 comment · Fixed by #76
Assignees
Labels
bug Something isn't working

Comments

@machinescream
Copy link
Contributor

class ComparableWrapper<V> extends Equatable {
  final V _value;

  ComparableWrapper(this._value);

  @override
  List<Object> get props => [_value];
}

void main() async {
  final c1 = ComparableWrapper([0]);
  final c2 = ComparableWrapper([0,0]);
  print(c1.hashCode == c2.hashCode); //true
  print(c1 == c2); // false
}
@felangel felangel added the bug Something isn't working label Jul 11, 2020
@felangel
Copy link
Owner

felangel commented Jul 11, 2020

Thanks to @Renesanse, the fix has been published in v1.2.1 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants