Commit deae10e0 authored by Robert Griesemer's avatar Robert Griesemer

go/ast: fix walk to handle "for range x"

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/117790043
parent 79b106ec
......@@ -275,7 +275,9 @@ func Walk(v Visitor, node Node) {
Walk(v, n.Body)
case *RangeStmt:
Walk(v, n.Key)
if n.Key != nil {
Walk(v, n.Key)
}
if n.Value != nil {
Walk(v, n.Value)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment