Skip to content

Commit d8e0ac9

Browse files
committed
Fix test
1 parent ae38997 commit d8e0ac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/alias_elimination.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,8 @@ function alias_eliminate_graph!(graph, var_to_diff, mm_orig::SparseMatrixCLIL)
724724
push!(reach₌, c => da)
725725
# `r` is aliased to its previous differentiation level's
726726
# aliases' derivative's equality aliases
727-
for n in neighbors(eqg, da)
728-
(n == da || n == r || is_diff_edge(r, n)) && continue
727+
r === nothing || for n in neighbors(eqg, da)
728+
(n == da || n == prev_r || is_diff_edge(prev_r, n)) && continue
729729
c′ = get_weight(eqg, da, n)
730730
push!(reach₌, c * c′ => n)
731731
end

0 commit comments

Comments
 (0)