Skip to content

Commit

Permalink
Merge pull request JuliaLang#23021 from JuliaLang/tb/test_22582
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jul 31, 2017
2 parents 4d4bdc1 + e55b1db commit f210687
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/codegen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,17 @@ function egal_svecs()
end
@test egal_svecs()
@test Core.svec(:a, :b) === Core.svec(:a, :b)

# issue #22582
function issue22582!(a::AbstractArray, b)
len = length(a)
if b
ccall(:jl_array_grow_end, Void, (Any, Csize_t), a, 1)
end
return len
end
let c = [1,2,3]
len1 = length(c)
len2 = issue22582!(c, true)
@test len1 == len2
end

0 comments on commit f210687

Please sign in to comment.