don't take the address of a range variable

This commit is contained in:
James Bardin 2021-08-03 16:53:45 -04:00
parent 09ab952683
commit 6401022bc8
1 changed files with 2 additions and 2 deletions

View File

@ -148,9 +148,9 @@ func ApplyMoves(stmts []MoveStatement, state *states.State) map[addrs.UniqueKey]
// may contain cycles and other sorts of invalidity. // may contain cycles and other sorts of invalidity.
func buildMoveStatementGraph(stmts []MoveStatement) *dag.AcyclicGraph { func buildMoveStatementGraph(stmts []MoveStatement) *dag.AcyclicGraph {
g := &dag.AcyclicGraph{} g := &dag.AcyclicGraph{}
for _, stmt := range stmts { for i := range stmts {
// The graph nodes are pointers to the actual statements directly. // 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. // Now we'll add the edges representing chaining and nesting relationships.