diff --git a/internal/refactoring/move_execute.go b/internal/refactoring/move_execute.go index 26eef65c02..011fc9f640 100644 --- a/internal/refactoring/move_execute.go +++ b/internal/refactoring/move_execute.go @@ -148,9 +148,9 @@ func ApplyMoves(stmts []MoveStatement, state *states.State) map[addrs.UniqueKey] // may contain cycles and other sorts of invalidity. func buildMoveStatementGraph(stmts []MoveStatement) *dag.AcyclicGraph { g := &dag.AcyclicGraph{} - for _, stmt := range stmts { + for i := range stmts { // The graph nodes are pointers to the actual statements directly. - g.Add(&stmt) + g.Add(&stmts[i]) } // Now we'll add the edges representing chaining and nesting relationships.