Skip to content

Commit

Permalink
Add a test for #22582/#22022.
Browse files Browse the repository at this point in the history
Ref #23021
(cherry picked from commit e55b1db)
  • Loading branch information
maleadt authored and ararslan committed Sep 15, 2017
1 parent 0667e76 commit e8acbd3
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 @@ -7,3 +7,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 e8acbd3

Please sign in to comment.