1
0
mirror of https://github.com/golang/go synced 2024-11-18 07:44:51 -07:00

cmd/compile: exit early if oldname doesn't find a name

Change-Id: I59ce1b40bc3472cc92a9a0a9fbd32342e0b945ad
Reviewed-on: https://go-review.googlesource.com/20152
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Robert Griesemer 2016-03-02 17:40:18 -08:00
parent c41608f4ac
commit 533f30b924

View File

@ -388,6 +388,7 @@ func oldname(s *Sym) *Node {
n = newname(s)
n.Op = ONONAME
n.Name.Iota = iota_ // save current iota value in const declarations
return n
}
if Curfn != nil && n.Op == ONAME && n.Name.Funcdepth > 0 && n.Name.Funcdepth != Funcdepth {