<p dir="auto">These types should print the same (since the type parameters are type-equal), if the datatype cache (and new hash computation) is working correctly:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Val{Tuple{Any}}
Val{Tuple{Any}}

julia&gt; Val{Tuple{T} where T}
Val{Tuple{T} where T}"><pre class="notranslate">julia<span class="pl-k">&gt;</span> Val{Tuple{Any}}
Val{Tuple{Any}}

julia<span class="pl-k">&gt;</span> Val{Tuple{T} <span class="pl-k">where</span> T}
Val{Tuple{T} <span class="pl-k">where</span> T}</pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; Val{Tuple{Float64,Int64,Int64}}
Val{Tuple{Float64,Int64,Int64}}

julia&gt; Val{Tuple{Float64,Vararg{T,2}} where T&lt;:Int64}
Val{Tuple{Float64,Vararg{T,2}} where T&lt;:Int64}

julia&gt; Val{Tuple{Float64,T,T} where T&lt;:Int64}
Val{Tuple{Float64,Vararg{T,2}} where T&lt;:Int64}"><pre class="notranslate"><code class="notranslate">julia&gt; Val{Tuple{Float64,Int64,Int64}}
Val{Tuple{Float64,Int64,Int64}}

julia&gt; Val{Tuple{Float64,Vararg{T,2}} where T&lt;:Int64}
Val{Tuple{Float64,Vararg{T,2}} where T&lt;:Int64}

julia&gt; Val{Tuple{Float64,T,T} where T&lt;:Int64}
Val{Tuple{Float64,Vararg{T,2}} where T&lt;:Int64}
</code></pre></div>
<p dir="auto">This is actually an improvement from before the new hash computation code (the last one was previously also creating a unique type). Found these by some quick fuzzing, so I'm pleased to see there weren't more!</p>
<p dir="auto">Internally in the system, we rely on the fact that concrete types are comparable by pointers. However, it is possible to create type signatures that are <code class="notranslate">==</code> to concrete types, but are not normalized to the corresponding type, causing all sorts of problems. Example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; f(x::Int8, y::Int8) = 1
f (generic function with 1 method)

julia&gt; f(x::T, y::T) where {T &lt;: Int8} = 2
julia-debug: /home/keno/julia-comparison/src/gf.c:1105: check_ambiguous_visitor: Assertion `closure-&gt;after' failed."><pre class="notranslate"><code class="notranslate">julia&gt; f(x::Int8, y::Int8) = 1
f (generic function with 1 method)

julia&gt; f(x::T, y::T) where {T &lt;: Int8} = 2
julia-debug: /home/keno/julia-comparison/src/gf.c:1105: check_ambiguous_visitor: Assertion `closure-&gt;after' failed.
</code></pre></div>