<p dir="auto">PSA: try to avoid ifelse. Otherwise, you cause bugs.</p>
<p dir="auto">action required: revert <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="124000174" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/14493" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/14493/hovercard" href="https://github.com/JuliaLang/julia/pull/14493">#14493</a></p>
<p dir="auto">symptom: coverage buildbots are broken (<a href="https://build.julialang.org/builders/coverage_ubuntu14.04-x64/builds/89/steps/Run%20non-inlined%20tests/logs/stdio" rel="nofollow">https://build.julialang.org/builders/coverage_ubuntu14.04-x64/builds/89/steps/Run%20non-inlined%20tests/logs/stdio</a>)</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ ./julia -q --inline=no
srand(123);
A1 = Base.LinAlg.UnitUpperTriangular(convert(Matrix{BigFloat}, randn(9,9) |&gt; (t -&gt; chol(t't))));
using Base.Test

julia&gt; similar(A1)
9x9 Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}:
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef
 #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef

julia&gt; copy!(B, A1);

julia&gt; @test B == A1

Error During Test
  Test threw an exception of type UndefRefError
  Expression: B == A1
  UndefRefError: access to undefined reference
   in getindex(::Array{BigFloat,2}, ::Int64, ::Int64) at array.jl:241
   in getindex(::Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}, ::Int64, ::Int64) at linalg/triangular.jl:114
   in _getindex(::Base.LinearSlow, ::Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}, ::CartesianIndex{2}) at multidimensional.jl:359
   in getindex(::Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}, ::CartesianIndex{2}) at abstractarray.jl:476
   in next(::Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}, ::Tuple{CartesianRange{CartesianIndex{2}},CartesianIndex{2}}) at abstractarray.jl:400
   in next(::Base.Zip2{Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}},Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}}, ::Tuple{Tuple{CartesianRange{CartesianIndex{2}},CartesianIndex{2}},Tuple{CartesianRange{CartesianIndex{2}},CartesianIndex{2}}}) at iterator.jl:48
   in ==(::Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}, ::Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}) at abstractarray.jl:990
   in eval(::Module, ::Any) at ./boot.jl:243
   in eval(::Module, ::Expr) at REPL.jl:3
ERROR: There was an error during testing
 in error(::ASCIIString) at error.jl:21
 in record(::Base.Test.FallbackTestSet, ::Base.Test.Error) at test.jl:317
 in do_test(::Base.Test.Threw, ::Expr) at test.jl:215
 in eval(::Module, ::Any) at ./boot.jl:243
 in eval(::Module, ::Expr) at REPL.jl:3"><pre class="notranslate"><span class="pl-k">$</span> <span class="pl-k">./</span>julia <span class="pl-k">-</span>q <span class="pl-k">--</span>inline<span class="pl-k">=</span>no
<span class="pl-c1">srand</span>(<span class="pl-c1">123</span>);
A1 <span class="pl-k">=</span> Base<span class="pl-k">.</span>LinAlg<span class="pl-k">.</span><span class="pl-c1">UnitUpperTriangular</span>(<span class="pl-c1">convert</span>(Matrix{BigFloat}, <span class="pl-c1">randn</span>(<span class="pl-c1">9</span>,<span class="pl-c1">9</span>) <span class="pl-k">|&gt;</span> (t <span class="pl-k">-&gt;</span> <span class="pl-c1">chol</span>(t<span class="pl-k">'</span>t))));
<span class="pl-k">using</span> Base<span class="pl-k">.</span>Test

julia<span class="pl-k">&gt;</span> <span class="pl-c1">similar</span>(A1)
<span class="pl-c1">9</span>x9 Base<span class="pl-k">.</span>LinAlg<span class="pl-k">.</span>UnitUpperTriangular{BigFloat,Array{BigFloat,<span class="pl-c1">2</span>}}<span class="pl-k">:</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>
 <span class="pl-c"><span class="pl-c">#</span>undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef  #undef</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">copy!</span>(B, A1);

julia<span class="pl-k">&gt;</span> <span class="pl-c1">@test</span> B <span class="pl-k">==</span> A1

Error During Test
  Test threw an exception of type UndefRefError
  Expression<span class="pl-k">:</span> B <span class="pl-k">==</span> A1
  UndefRefError<span class="pl-k">:</span> access to undefined reference
   <span class="pl-k">in</span> <span class="pl-c1">getindex</span>(<span class="pl-k">::</span><span class="pl-c1">Array{BigFloat,2}</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>) at array<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">241</span>
   <span class="pl-k">in</span> <span class="pl-c1">getindex</span>(<span class="pl-k">::</span><span class="pl-c1">Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>, <span class="pl-k">::</span><span class="pl-c1">Int64</span>) at linalg<span class="pl-k">/</span>triangular<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">114</span>
   <span class="pl-k">in</span> <span class="pl-c1">_getindex</span>(<span class="pl-k">::</span><span class="pl-c1">Base.LinearSlow</span>, <span class="pl-k">::</span><span class="pl-c1">Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}</span>, <span class="pl-k">::</span><span class="pl-c1">CartesianIndex{2}</span>) at multidimensional<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">359</span>
   <span class="pl-k">in</span> <span class="pl-c1">getindex</span>(<span class="pl-k">::</span><span class="pl-c1">Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}</span>, <span class="pl-k">::</span><span class="pl-c1">CartesianIndex{2}</span>) at abstractarray<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">476</span>
   <span class="pl-k">in</span> <span class="pl-c1">next</span>(<span class="pl-k">::</span><span class="pl-c1">Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}</span>, <span class="pl-k">::</span><span class="pl-c1">Tuple{CartesianRange{CartesianIndex{2}},CartesianIndex{2}}</span>) at abstractarray<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">400</span>
   <span class="pl-k">in</span> <span class="pl-c1">next</span>(<span class="pl-k">::</span><span class="pl-c1">Base.Zip2{Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}},Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}}</span>, <span class="pl-k">::</span><span class="pl-c1">Tuple</span>{Tuple{CartesianRange{CartesianIndex{<span class="pl-c1">2</span>}},CartesianIndex{<span class="pl-c1">2</span>}},Tuple{CartesianRange{CartesianIndex{<span class="pl-c1">2</span>}},CartesianIndex{<span class="pl-c1">2</span>}}}) at iterator<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">48</span>
   <span class="pl-k">in</span> <span class="pl-k">==</span>(<span class="pl-k">::</span><span class="pl-c1">Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}</span>, <span class="pl-k">::</span><span class="pl-c1">Base.LinAlg.UnitUpperTriangular{BigFloat,Array{BigFloat,2}}</span>) at abstractarray<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">990</span>
   <span class="pl-k">in</span> <span class="pl-c1">eval</span>(<span class="pl-k">::</span><span class="pl-c1">Module</span>, <span class="pl-k">::</span><span class="pl-c1">Any</span>) at <span class="pl-k">./</span>boot<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">243</span>
   <span class="pl-k">in</span> <span class="pl-c1">eval</span>(<span class="pl-k">::</span><span class="pl-c1">Module</span>, <span class="pl-k">::</span><span class="pl-c1">Expr</span>) at REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">3</span>
ERROR<span class="pl-k">:</span> There was an error during testing
 <span class="pl-k">in</span> <span class="pl-c1">error</span>(<span class="pl-k">::</span><span class="pl-c1">ASCIIString</span>) at error<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">21</span>
 <span class="pl-k">in</span> <span class="pl-c1">record</span>(<span class="pl-k">::</span><span class="pl-c1">Base.Test.FallbackTestSet</span>, <span class="pl-k">::</span><span class="pl-c1">Base.Test.Error</span>) at test<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">317</span>
 <span class="pl-k">in</span> <span class="pl-c1">do_test</span>(<span class="pl-k">::</span><span class="pl-c1">Base.Test.Threw</span>, <span class="pl-k">::</span><span class="pl-c1">Expr</span>) at test<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">215</span>
 <span class="pl-k">in</span> <span class="pl-c1">eval</span>(<span class="pl-k">::</span><span class="pl-c1">Module</span>, <span class="pl-k">::</span><span class="pl-c1">Any</span>) at <span class="pl-k">./</span>boot<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">243</span>
 <span class="pl-k">in</span> <span class="pl-c1">eval</span>(<span class="pl-k">::</span><span class="pl-c1">Module</span>, <span class="pl-k">::</span><span class="pl-c1">Expr</span>) at REPL<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">3</span></pre></div>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; versioninfo()
Julia Version 1.8.0-DEV.836
Commit c054dbc6d4 (2021-10-28 16:31 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin20.6.0)
  CPU: Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 4

julia&gt; ((x::T) where {T}) -&gt;  x + one(T)
#9 (generic function with 1 method)

julia&gt; Base.Experimental.@opaque ((x::T) where {T}) -&gt;  x + one(T)
ERROR: syntax: ssavalue with no def
Stacktrace:
 [1] top-level scope
   @ REPL[12]:1"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-c1">versioninfo</span>()
Julia Version <span class="pl-c1">1.8</span>.<span class="pl-c1">0</span><span class="pl-k">-</span>DEV.<span class="pl-c1">836</span>
Commit c054dbc6d4 (<span class="pl-c1">2021</span><span class="pl-k">-</span><span class="pl-c1">10</span><span class="pl-k">-</span><span class="pl-c1">28</span> <span class="pl-c1">16</span><span class="pl-k">:</span><span class="pl-c1">31</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>darwin20.<span class="pl-c1">6.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">8559</span>U CPU @ <span class="pl-c1">2.70</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">12.0</span>.<span class="pl-c1">1</span> (ORCJIT, skylake)
Environment<span class="pl-k">:</span>
  JULIA_NUM_THREADS <span class="pl-k">=</span> <span class="pl-c1">4</span>

julia<span class="pl-k">&gt;</span> ((x<span class="pl-k">::</span><span class="pl-c1">T</span>) <span class="pl-k">where</span> {T}) <span class="pl-k">-&gt;</span>  x <span class="pl-k">+</span> <span class="pl-c1">one</span>(T)
<span class="pl-c"><span class="pl-c">#</span>9 (generic function with 1 method)</span>

julia<span class="pl-k">&gt;</span> Base<span class="pl-k">.</span>Experimental<span class="pl-k">.</span><span class="pl-c1">@opaque</span> ((x<span class="pl-k">::</span><span class="pl-c1">T</span>) <span class="pl-k">where</span> {T}) <span class="pl-k">-&gt;</span>  x <span class="pl-k">+</span> <span class="pl-c1">one</span>(T)
ERROR<span class="pl-k">:</span> syntax<span class="pl-k">:</span> ssavalue with no def
Stacktrace<span class="pl-k">:</span>
 [<span class="pl-c1">1</span>] top<span class="pl-k">-</span>level scope
   @ REPL[<span class="pl-c1">12</span>]<span class="pl-k">:</span><span class="pl-c1">1</span></pre></div>
<p dir="auto">It seems like opaque closures don't know how to deal with static type params.</p>