From 86d84525152988f1e353860e0a7173a2d4bfcd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 18 Oct 2024 13:10:23 +0200 Subject: [PATCH] [Coloring] avoid index conflict in variable name --- src/Nonlinear/ReverseAD/Coloring/Coloring.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nonlinear/ReverseAD/Coloring/Coloring.jl b/src/Nonlinear/ReverseAD/Coloring/Coloring.jl index 9406e9711d..7eef697162 100644 --- a/src/Nonlinear/ReverseAD/Coloring/Coloring.jl +++ b/src/Nonlinear/ReverseAD/Coloring/Coloring.jl @@ -344,8 +344,8 @@ function recovery_preprocess( sorted_edges[idx] = Tuple{Int,Int}[] sizehint!(sorted_edges[idx], edge_count[idx]) end - for i in eachindex(g.edges) - u, v = g.edges[i] + for k in eachindex(g.edges) + u, v = g.edges[k] i = min(color[u], color[v]) j = max(color[u], color[v]) idx = twocolorindex[i, j]