Same types have different hash

EDIT: Also posted as Bug report at

Just stumbled over inconsistent == and hash for Tuple types:

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

Hence Tuple Types don’t work as keys for Dictionaries in the sense of 1., which I currently would like to have.

Is this intended behaviour?
How can I create a Dict with the semantic of 1.?

Julia 1.2.0

I can replicate in 1.3-rc4. I think that this is a bug, you should open an issue.

1 Like