Skip to content

Commit

Permalink
Fix make_zero on undef arrays (#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cheng Gong authored Oct 27, 2023
1 parent 12b9c59 commit 644b9d9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2108,8 +2108,10 @@ end
newa = RT(undef, size(prev))
seen[prev] = newa
for I in eachindex(prev)
pv = prev[I]
@inbounds newa[I] = make_zero(Core.Typeof(pv), seen, pv, Val(copy_if_inactive))
if isassigned(prev, I)
pv = prev[I]
@inbounds newa[I] = make_zero(Core.Typeof(pv), seen, pv, Val(copy_if_inactive))
end
end
return newa
end
Expand Down

0 comments on commit 644b9d9

Please sign in to comment.