]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: report correct position in redeclaration errors
authorRobert Griesemer <gri@golang.org>
Mon, 22 May 2017 18:20:34 +0000 (11:20 -0700)
committerRobert Griesemer <gri@golang.org>
Mon, 22 May 2017 19:20:11 +0000 (19:20 +0000)
commitd79bb78a71c6f2084497c1291041aa1fa2325835
tree4d631de8b69b643f6418b8fe96188849faffa8d6
parent8f6d68ebaa660c6db8a87d418e95f8c0d3a221e4
cmd/compile: report correct position in redeclaration errors

When restoring syms, we must also restore the original Lastlineno.
Bug introduced with https://golang.org/cl/41390/.

Fixes #20415.

Change-Id: Ie81d36279d717e330951b52f42dcee4b0025b9f0
Reviewed-on: https://go-review.googlesource.com/43811
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/types/scope.go
src/cmd/compile/internal/types/sym.go
test/fixedbugs/issue20415.go [new file with mode: 0644]