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

Same tuple types have different hash #33766

Closed
schlichtanders opened this issue Nov 5, 2019 · 1 comment
Closed

Same tuple types have different hash #33766

schlichtanders opened this issue Nov 5, 2019 · 1 comment

Comments

@schlichtanders
Copy link

== and hash are currently inconsistent for Tuple types:

  1. e.g. while Tuple{Array} == (Tuple{Array{T}} where T)
  2. we have hash(Tuple{Array}) != hash(Tuple{Array{T}} where T)

Hence Tuple Types also don't work as keys for Dictionaries in the sense of 1. (which is how I stumbled upon this).

This question was asked first on discourse https://discourse.julialang.org/t/same-types-have-different-hash/30725 and considered to be a bug by @tpapp

Tested for following julia versions: 1.0.3, 1.1.1, 1.2.0, 1.3-rc4

@KristofferC
Copy link
Member

Dup of #26105.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants