-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]needs decisionA decision on this change is neededA decision on this change is needed
Description
Consider the following code demonstrating the bug in append!
julia> a = Int64[]
0-element Array{Int64,1}
julia> append!(a, [1.1, 2.2])
ERROR: InexactError()
in copy! at abstractarray.jl:344
in append! at array.jl:447
julia> a
2-element Array{Int64,1}:
13128344792
4521590816Now, 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.
I actually discovered this bug in testing code, where I was testing that some code involving an append! raised an appropriate error. As soon as I added this test, all other tests in my code started to fail miserably.
non-Jedi and oxinabox
Metadata
Metadata
Assignees
Labels
arrays[a, r, r, a, y, s][a, r, r, a, y, s]needs decisionA decision on this change is neededA decision on this change is needed