<p dir="auto">This is also present in Julia v1.1:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; struct ProductSpace{T&lt;:Tuple}
       end

julia&gt; using StaticArrays
[ Info: Precompiling StaticArrays [90137ffa-7385-5640-81b9-e52037218182]

julia&gt; function convert_space(::Type{ProductSpace{Tuple{SVector{M,T},T}}}, x::SVector{N,T}) where {N,M,T}
       end
convert_space (generic function with 1 method)

julia&gt; function convert_space(::Type{ProductSpace{Tuple{T,SVector{M,T}}}}, x::SVector{N,T}) where {N,M,T}
       end
ERROR: StackOverflowError:
Stacktrace:
 [1] top-level scope at REPL[4]:1

julia&gt; versioninfo()
Julia Version 1.3.0-DEV.121
Commit dc6c7c7e6f (2019-04-27 03:49 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.5.0)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">struct</span> ProductSpace{T<span class="pl-k">&lt;:</span><span class="pl-c1">Tuple</span>}
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-k">using</span> StaticArrays
[ Info<span class="pl-k">:</span> Precompiling StaticArrays [<span class="pl-c1">90137</span>ffa<span class="pl-k">-</span><span class="pl-c1">7385</span><span class="pl-k">-</span><span class="pl-c1">5640</span><span class="pl-k">-</span><span class="pl-c1">81</span>b9<span class="pl-k">-</span>e52037218182]

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">convert_space</span>(<span class="pl-k">::</span><span class="pl-c1">Type</span>{ProductSpace{Tuple{SVector{M,T},T}}}, x<span class="pl-k">::</span><span class="pl-c1">SVector{N,T}</span>) <span class="pl-k">where</span> {N,M,T}
       <span class="pl-c1">end</span>
convert_space (generic <span class="pl-k">function</span> with <span class="pl-c1">1</span> method)

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">convert_space</span>(<span class="pl-k">::</span><span class="pl-c1">Type</span>{ProductSpace{Tuple{T,SVector{M,T}}}}, x<span class="pl-k">::</span><span class="pl-c1">SVector{N,T}</span>) <span class="pl-k">where</span> {N,M,T}
       <span class="pl-c1">end</span>
ERROR<span class="pl-k">:</span> StackOverflowError<span class="pl-k">:</span>
Stacktrace<span class="pl-k">:</span>
 [<span class="pl-c1">1</span>] top<span class="pl-k">-</span>level scope at REPL[<span class="pl-c1">4</span>]<span class="pl-k">:</span><span class="pl-c1">1</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">1.3</span>.<span class="pl-c1">0</span><span class="pl-k">-</span>DEV.<span class="pl-c1">121</span>
Commit dc6c7c7e6f (<span class="pl-c1">2019</span><span class="pl-k">-</span><span class="pl-c1">04</span><span class="pl-k">-</span><span class="pl-c1">27</span> <span class="pl-c1">03</span><span class="pl-k">:</span><span class="pl-c1">49</span> UTC)
Platform Info<span class="pl-k">:</span>
  OS<span class="pl-k">:</span> macOS (x86_64<span class="pl-k">-</span>apple<span class="pl-k">-</span>darwin18.<span class="pl-c1">5.0</span>)
  CPU<span class="pl-k">:</span> <span class="pl-c1">Intel</span>(R) <span class="pl-c1">Core</span>(TM) i7<span class="pl-k">-</span><span class="pl-c1">7700</span>HQ CPU @ <span class="pl-c1">2.80</span>GHz
  WORD_SIZE<span class="pl-k">:</span> <span class="pl-c1">64</span>
  LIBM<span class="pl-k">:</span> libopenlibm
  LLVM<span class="pl-k">:</span> libLLVM<span class="pl-k">-</span><span class="pl-c1">6.0</span>.<span class="pl-c1">1</span> (ORCJIT, skylake)</pre></div>
<p dir="auto">I'm making a new issue for an older issue (<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233812880" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/22239" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/22239/hovercard" href="https://github.com/JuliaLang/julia/issues/22239">#22239</a>) that was partially fixed. The problem is a StackOverflow error in the following minimal working example:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="bar(::Type{Val{Tuple{Tuple{T},T}}}, ::Val{T}) where {T} = 1
bar(::Type{Val{Tuple{T,Tuple{T}}}}, ::Val{T}) where {T} = 2"><pre class="notranslate"><code class="notranslate">bar(::Type{Val{Tuple{Tuple{T},T}}}, ::Val{T}) where {T} = 1
bar(::Type{Val{Tuple{T,Tuple{T}}}}, ::Val{T}) where {T} = 2
</code></pre></div>
<p dir="auto">The output using the current nightly build is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: LoadError: StackOverflowError:
Stacktrace:
 [1] top-level scope
 [2] include at ./boot.jl:306 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1072
 [4] include(::Module, ::String) at ./sysimg.jl:29
 [5] exec_options(::Base.JLOptions) at ./client.jl:327
 [6] _start() at ./client.jl:455
in expression starting at /tmp/mwe.jl:2"><pre class="notranslate"><code class="notranslate">ERROR: LoadError: StackOverflowError:
Stacktrace:
 [1] top-level scope
 [2] include at ./boot.jl:306 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1072
 [4] include(::Module, ::String) at ./sysimg.jl:29
 [5] exec_options(::Base.JLOptions) at ./client.jl:327
 [6] _start() at ./client.jl:455
in expression starting at /tmp/mwe.jl:2
</code></pre></div>
<p dir="auto">As <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/martinholters/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/martinholters">@martinholters</a> pointed out in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="233812880" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/22239" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/22239/hovercard" href="https://github.com/JuliaLang/julia/issues/22239">#22239</a>, the error results from <code class="notranslate">typeintersect</code> as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; typeintersect(Tuple{Type{Tuple{T,Val{T}}}, Val{T}} where T, Tuple{Type{Tuple{Val{T},T}}, Val{T}} where T)
ERROR: StackOverflowError:
Stacktrace:
 [1] typeintersect(::Any, ::Any) at ./reflection.jl:469
 [2] top-level scope"><pre class="notranslate"><code class="notranslate">julia&gt; typeintersect(Tuple{Type{Tuple{T,Val{T}}}, Val{T}} where T, Tuple{Type{Tuple{Val{T},T}}, Val{T}} where T)
ERROR: StackOverflowError:
Stacktrace:
 [1] typeintersect(::Any, ::Any) at ./reflection.jl:469
 [2] top-level scope
</code></pre></div>
<p dir="auto">Above examples were tested today on master:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo()
Julia Version 0.7.0-DEV.4594
Commit 29a1719f95 (2018-03-15 22:41 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
Environment:"><pre class="notranslate"><code class="notranslate">julia&gt; versioninfo()
Julia Version 0.7.0-DEV.4594
Commit 29a1719f95 (2018-03-15 22:41 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Core(TM) i5-3570 CPU @ 3.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)
Environment:
</code></pre></div>
<p dir="auto">The examples do also lead to similar errors on 0.6.2.</p>