File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1830,19 +1830,19 @@ end
1830
1830
"""
1831
1831
set_retained_vns_del!(vi::VarInfo)
1832
1832
1833
- Set the `"del"` flag of variables in `vi` with `order > num_produce` to `true`.
1833
+ Set the `"del"` flag of variables in `vi` with `order > num_produce` to `true`. If
1834
+ `num_produce` is `0`, _all_ variables will have their `"del"` flag set to `true`.
1834
1835
1835
1836
Will error if `vi` does not have an accumulator for `VariableOrder`.
1836
1837
"""
1837
1838
function set_retained_vns_del! (vi:: VarInfo )
1838
1839
if ! hasacc (vi, Val (:VariableOrder ))
1839
1840
msg = " `vi` must have an accumulator for VariableOrder to set the `del` flag."
1840
- raise (ArgumentError (msg))
1841
+ throw (ArgumentError (msg))
1841
1842
end
1842
1843
num_produce = get_num_produce (vi)
1843
1844
for vn in keys (vi)
1844
- order = getorder (vi, vn)
1845
- if order > num_produce
1845
+ if num_produce == 0 || getorder (vi, vn) > num_produce
1846
1846
set_flag! (vi, vn, " del" )
1847
1847
end
1848
1848
end
You can’t perform that action at this time.
0 commit comments