# Same types have different hash

**URL:** <https://discourse.julialang.org/t/same-types-have-different-hash/30725>\
**Category:** General Usage\
**Tags:** question\
**Created:** [November 5, 2019, 6:22am UTC](https://discourse.julialang.org/t/same-types-have-different-hash/30725 "2019-11-05T06:22:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)\
**Post date:** [November 5, 2019, 6:22am UTC](https://discourse.julialang.org/t/same-types-have-different-hash/30725/1 "2019-11-05T06:22:20Z")

</div>

EDIT: Also posted as Bug report at [https://github.com/JuliaLang/julia/issues/33766](https://github.com/JuliaLang/julia/issues/33766)

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

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 5, 2019, 6:41am UTC](https://discourse.julialang.org/t/same-types-have-different-hash/30725/2 "2019-11-05T06:41:50Z")

</div>

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