<p dir="auto">Running <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/timholy/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/timholy">@timholy</a> 's test case from <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="108756041" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/13350" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/13350/hovercard" href="https://github.com/JuliaLang/julia/issues/13350">#13350</a>:</p>
<p dir="auto">commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/7dcc01be36a854bf95915f1cdf157df7c722ea68/hovercard" href="https://github.com/JuliaLang/julia/commit/7dcc01be36a854bf95915f1cdf157df7c722ea68"><tt>7dcc01b</tt></a>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Without parentheses:
  0.567878 seconds (16.01 M allocations: 488.552 MB, 5.03% gc time)
With parentheses:
  0.421889 seconds (11 allocations: 480 bytes)"><pre class="notranslate"><code class="notranslate">Without parentheses:
  0.567878 seconds (16.01 M allocations: 488.552 MB, 5.03% gc time)
With parentheses:
  0.421889 seconds (11 allocations: 480 bytes)
</code></pre></div>
<p dir="auto">commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/JuliaLang/julia/commit/8ce7a02f6bed51a09600307f395d8c6887f0f104/hovercard" href="https://github.com/JuliaLang/julia/commit/8ce7a02f6bed51a09600307f395d8c6887f0f104"><tt>8ce7a02</tt></a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Without parentheses:
  2.149215 seconds (70.01 M allocations: 1.654 GB, 5.22% gc time)
With parentheses:
  2.251477 seconds (74.00 M allocations: 1.773 GB, 5.45% gc time)"><pre class="notranslate"><code class="notranslate">Without parentheses:
  2.149215 seconds (70.01 M allocations: 1.654 GB, 5.22% gc time)
With parentheses:
  2.251477 seconds (74.00 M allocations: 1.773 GB, 5.45% gc time)
</code></pre></div>
<p dir="auto">cc <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/vtjnash/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/vtjnash">@vtjnash</a></p>
<p dir="auto">Using the ForwardDiff package it seems that type inference can figure out the result of an operation fine on 0.4.1 but not on 0.5.</p>
<p dir="auto">As an example:</p>
<p dir="auto">On 0.4.1:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Base.return_types(*, (ForwardDiff.GradientNumber{2,Float64,Tuple{Float64,Float64}},Float64))
1-element Array{Any,1}:
 ForwardDiff.GradientNumber{2,Float64,Tuple{Float64,Float64}}"><pre class="notranslate">julia<span class="pl-k">&gt;</span> Base<span class="pl-k">.</span><span class="pl-c1">return_types</span>(<span class="pl-k">*</span>, (ForwardDiff<span class="pl-k">.</span>GradientNumber{<span class="pl-c1">2</span>,Float64,Tuple{Float64,Float64}},Float64))
<span class="pl-c1">1</span><span class="pl-k">-</span>element Array{Any,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 ForwardDiff<span class="pl-k">.</span>GradientNumber{<span class="pl-c1">2</span>,Float64,Tuple{Float64,Float64}}</pre></div>
<p dir="auto">On latest 0.5:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; Base.return_types(*, (ForwardDiff.GradientNumber{2,Float64,Tuple{Float64,Float64}},Float64))
1-element Array{Any,1}:
 ForwardDiff.GradientNumber{N,T,C}"><pre class="notranslate">julia<span class="pl-k">&gt;</span> Base<span class="pl-k">.</span><span class="pl-c1">return_types</span>(<span class="pl-k">*</span>, (ForwardDiff<span class="pl-k">.</span>GradientNumber{<span class="pl-c1">2</span>,Float64,Tuple{Float64,Float64}},Float64))
<span class="pl-c1">1</span><span class="pl-k">-</span>element Array{Any,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 ForwardDiff<span class="pl-k">.</span>GradientNumber{N,T,C}</pre></div>
<p dir="auto">A (low res) screenshot of warntype where the colors are visible:<br>
<a href="http://i.imgur.com/u17xqPI.png" rel="nofollow">http://i.imgur.com/u17xqPI.png</a></p>