<p dir="auto">On 0.4, <code class="notranslate">string(::Int)</code> was type-stable. This is no longer the case on master:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; f(x) = string(x)
gf (generic function with 1 method)

julia&gt; g(x) = dec(x)
g (generic function with 1 method)

julia&gt; @code_warntype f(2)
Variables:
  #self#::#f
  x::Int64

Body:
  begin  # REPL[1], line 1:
      return (Base.dec)(x::Int64)::Any
  end::Any

julia&gt; @code_warntype g(2)
Variables:
  #self#::#g
  x::Int64

Body:
  begin  # REPL[2], line 1:
      return (Base.dec)((Base.box)(UInt64,(Base.box)(Int64,(Base.flipsign_int)(x::Int64,x::Int64))),1,(Base.slt_int)(x::Int64,0)::Bool)::ASCIIString
  end::ASCIIString"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-en">f</span>(x) <span class="pl-k">=</span> <span class="pl-c1">string</span>(x)
gf (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-en">g</span>(x) <span class="pl-k">=</span> <span class="pl-c1">dec</span>(x)
g (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-c1">@code_warntype</span> <span class="pl-c1">f</span>(<span class="pl-c1">2</span>)
Variables<span class="pl-k">:</span>
  <span class="pl-c"><span class="pl-c">#</span>self#::#f</span>
  x<span class="pl-k">::</span><span class="pl-c1">Int64</span>

Body<span class="pl-k">:</span>
  <span class="pl-k">begin</span>  <span class="pl-c"><span class="pl-c">#</span> REPL[1], line 1:</span>
      <span class="pl-k">return</span> (Base<span class="pl-k">.</span>dec)(x<span class="pl-k">::</span><span class="pl-c1">Int64</span>)<span class="pl-k">::</span><span class="pl-c1">Any</span>
  <span class="pl-k">end</span><span class="pl-k">::</span><span class="pl-c1">Any</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">@code_warntype</span> <span class="pl-c1">g</span>(<span class="pl-c1">2</span>)
Variables<span class="pl-k">:</span>
  <span class="pl-c"><span class="pl-c">#</span>self#::#g</span>
  x<span class="pl-k">::</span><span class="pl-c1">Int64</span>

Body<span class="pl-k">:</span>
  <span class="pl-k">begin</span>  <span class="pl-c"><span class="pl-c">#</span> REPL[2], line 1:</span>
      <span class="pl-k">return</span> (Base<span class="pl-k">.</span>dec)((Base<span class="pl-k">.</span>box)(UInt64,(Base<span class="pl-k">.</span>box)(Int64,(Base<span class="pl-k">.</span>flipsign_int)(x<span class="pl-k">::</span><span class="pl-c1">Int64</span>,x<span class="pl-k">::</span><span class="pl-c1">Int64</span>))),<span class="pl-c1">1</span>,(Base<span class="pl-k">.</span>slt_int)(x<span class="pl-k">::</span><span class="pl-c1">Int64</span>,<span class="pl-c1">0</span>)<span class="pl-k">::</span><span class="pl-c1">Bool</span>)<span class="pl-k">::</span><span class="pl-c1">ASCIIString</span>
  <span class="pl-k">end</span><span class="pl-k">::</span><span class="pl-c1">ASCIIString</span></pre></div>
<p dir="auto">And yet, we have:</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="string(x::Union{Int8,Int16,Int32,Int64,Int128}) = dec(x)"><pre class="notranslate"><span class="pl-en">string</span>(x<span class="pl-k">::</span><span class="pl-c1">Union{Int8,Int16,Int32,Int64,Int128}</span>) <span class="pl-k">=</span> <span class="pl-c1">dec</span>(x)</pre></div>
<p dir="auto">if I define a function d2 before a function d1 which calls d2 then change d2, d1 uses the old definition for d2.<br>
I assume this is because it is all precompiled, but maybe there should be a note warning of this? Or would it be possible to replace the old definition with a longjmp to the new one?<br>
(Mostly important for the REPL, since I don't always do a full load)</p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; function d2()
       a
       end

julia&gt; function d()
         d2()
       end

julia&gt; d()
in d: a not defined

julia&gt; function d2()
       b=2
       end

julia&gt; d()
in d: a not defined

julia&gt; d2
Methods for generic function d2
d2() at prompt:2

julia&gt; function d()
         d2()
       end

julia&gt; d()
2"><pre class="notranslate">julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d2</span>()
       a
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d</span>()
         <span class="pl-c1">d2</span>()
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">d</span>()
in d<span class="pl-k">:</span> a not defined

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d2</span>()
       b<span class="pl-k">=</span><span class="pl-c1">2</span>
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">d</span>()
in d<span class="pl-k">:</span> a not defined

julia<span class="pl-k">&gt;</span> d2
Methods <span class="pl-k">for</span> generic <span class="pl-k">function</span> d2
<span class="pl-c1">d2</span>() at prompt<span class="pl-k">:</span><span class="pl-c1">2</span>

julia<span class="pl-k">&gt;</span> <span class="pl-k">function</span> <span class="pl-en">d</span>()
         <span class="pl-c1">d2</span>()
       <span class="pl-k">end</span>

julia<span class="pl-k">&gt;</span> <span class="pl-c1">d</span>()
<span class="pl-c1">2</span></pre></div>