1
0
mirror of https://github.com/golang/go synced 2024-11-17 19:04:47 -07:00

cmd/compile: fix two instances of { lineno = ...; yyerror }

Updates #19683

Change-Id: Ic00d5a9807200791cf37553f4f802dbf27beea19
Reviewed-on: https://go-review.googlesource.com/38770
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-03-28 11:17:52 -07:00
parent b87fcc6e06
commit 95bfd927f5

View File

@ -49,12 +49,10 @@ func walk(fn *Node) {
if defn.Left.Used() {
continue
}
lineno = defn.Left.Pos
yyerror("%v declared and not used", ln.Sym)
yyerrorl(defn.Left.Pos, "%v declared and not used", ln.Sym)
defn.Left.SetUsed(true) // suppress repeats
} else {
lineno = ln.Pos
yyerror("%v declared and not used", ln.Sym)
yyerrorl(ln.Pos, "%v declared and not used", ln.Sym)
}
}