1
0
mirror of https://github.com/golang/go synced 2024-11-23 19:20:03 -07:00

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

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/117790043
This commit is contained in:
Robert Griesemer 2014-07-14 19:14:27 -07:00
parent 79b106ec62
commit deae10e038

View File

@ -275,7 +275,9 @@ func Walk(v Visitor, node Node) {
Walk(v, n.Body)
case *RangeStmt:
if n.Key != nil {
Walk(v, n.Key)
}
if n.Value != nil {
Walk(v, n.Value)
}