<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="myfunc(myvar::AbstractMyType{T})::Array{T} where {T} = myvar.myproperty"><pre class="notranslate"><span class="pl-en">myfunc</span>(myvar<span class="pl-k">::</span><span class="pl-c1">AbstractMyType{T}</span>)<span class="pl-k">::</span><span class="pl-c1">Array{T}</span> <span class="pl-k">where</span> {T} <span class="pl-k">=</span> myvar<span class="pl-k">.</span>myproperty</pre></div>
<p dir="auto">throws <code class="notranslate">UndefVarError: T not defined</code> but</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function myfunc(myvar::AbstractMyType{T})::Array{T} where {T}
  myvar.myproperty
end"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">myfunc</span>(myvar<span class="pl-k">::</span><span class="pl-c1">AbstractMyType{T}</span>)<span class="pl-k">::</span><span class="pl-c1">Array{T}</span> <span class="pl-k">where</span> {T}
  myvar<span class="pl-k">.</span>myproperty
<span class="pl-k">end</span></pre></div>
<p dir="auto">works absolutely fine. Is there something I am missing?</p>
<p dir="auto">In other words, <code class="notranslate">::ReturnType</code> is incompatible with <code class="notranslate">where</code> clauses in the short function form declarations.<br>
I thought an exemple was more clear than my words in the title.</p>