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

Last changes with hash function is not good at all #43

Closed
Renesanse opened this issue Nov 24, 2019 · 3 comments
Closed

Last changes with hash function is not good at all #43

Renesanse opened this issue Nov 24, 2019 · 3 comments
Assignees
Labels
bug
Projects

Comments

@Renesanse
Copy link

@Renesanse Renesanse commented Nov 24, 2019

code:

class ComparableWrapper extends Equatable {
  final Object property;
  ComparableWrapper(this.property);

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

v1.0.0:
code:

    final map = {1: '1', 2: '2'};
    print(ComparableWrapper(map).hashCode);
    map.remove(1);
    print(ComparableWrapper(map).hashCode);

console:
1061099485
1061099485

v0.6.1:
code:

    final map = {1: '1', 2: '2'};
    print(ComparableWrapper(map).hashCode);
    map.remove(1);
    print(ComparableWrapper(map).hashCode);

console:
343974154
350953922

Well, I am understand you want to find a good hash function, but I think last one was better =) Thx

@felangel

This comment has been minimized.

Copy link
Owner

@felangel felangel commented Nov 24, 2019

Hi @Renesanse 👋
Thanks for opening an issue and for catching this case! I'll have a fix asap 👍

@felangel felangel self-assigned this Nov 24, 2019
@felangel felangel added the bug label Nov 24, 2019
@felangel felangel mentioned this issue Nov 24, 2019
3 of 3 tasks complete
@felangel felangel added this to In progress in equatable Nov 24, 2019
@felangel

This comment has been minimized.

Copy link
Owner

@felangel felangel commented Nov 24, 2019

Fixed in #44 and published in v1.0.1

@felangel felangel closed this Nov 24, 2019
@felangel felangel moved this from In progress to Done in equatable Nov 24, 2019
@Renesanse

This comment has been minimized.

Copy link
Author

@Renesanse Renesanse commented Nov 24, 2019

Thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
equatable
  
Done
2 participants
You can’t perform that action at this time.