Commit 95bfd927 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent b87fcc6e
......@@ -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)
}
}
......
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