<p dir="auto">Julia v1.3.0 on OSX v10.15.4</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="a = Array[]

append!(a, &quot;foo&quot;)
&gt; ERROR: MethodError: Cannot `convert` an object of type Char to an object of type String

push!(a, &quot;bar&quot;)
&gt; 4-element Array{String,1}:
 #undef  
 #undef  
 #undef  
    &quot;bar&quot;"><pre class="notranslate"><code class="notranslate">a = Array[]

append!(a, "foo")
&gt; ERROR: MethodError: Cannot `convert` an object of type Char to an object of type String

push!(a, "bar")
&gt; 4-element Array{String,1}:
 #undef  
 #undef  
 #undef  
    "bar"
</code></pre></div>
<p dir="auto">Consider the following code demonstrating the bug in <code class="notranslate">append!</code></p>
<div class="highlight highlight-source-julia notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="julia&gt; a = Int64[]
0-element Array{Int64,1}

julia&gt; append!(a, [1.1, 2.2])
ERROR: InexactError()
 in copy! at abstractarray.jl:344
 in append! at array.jl:447

julia&gt; a
2-element Array{Int64,1}:
 13128344792
  4521590816"><pre class="notranslate">julia<span class="pl-k">&gt;</span> a <span class="pl-k">=</span> Int64[]
<span class="pl-c1">0</span><span class="pl-k">-</span>element Array{Int64,<span class="pl-c1">1</span>}

julia<span class="pl-k">&gt;</span> <span class="pl-c1">append!</span>(a, [<span class="pl-c1">1.1</span>, <span class="pl-c1">2.2</span>])
ERROR<span class="pl-k">:</span> <span class="pl-c1">InexactError</span>()
 <span class="pl-k">in</span> copy! at abstractarray<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">344</span>
 <span class="pl-k">in</span> append! at array<span class="pl-k">.</span>jl<span class="pl-k">:</span><span class="pl-c1">447</span>

julia<span class="pl-k">&gt;</span> a
<span class="pl-c1">2</span><span class="pl-k">-</span>element Array{Int64,<span class="pl-c1">1</span>}<span class="pl-k">:</span>
 <span class="pl-c1">13128344792</span>
  <span class="pl-c1">4521590816</span></pre></div>
<p dir="auto">Now, in this case the program terminates with an error, but if the append statement is within a try/catch block the growth of the array can go unnoticed.</p>
<p dir="auto">I actually discovered this bug in testing code, where I was testing that some code involving an <code class="notranslate">append!</code> raised an appropriate error. As soon as I added this test, all other tests in my code started to fail miserably.</p>