]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] go/types: no "declared but not used" errors for invalid var decls
authorRob Findley <rfindley@google.com>
Thu, 4 Feb 2021 15:27:41 +0000 (10:27 -0500)
committerRobert Findley <rfindley@google.com>
Thu, 4 Feb 2021 17:13:14 +0000 (17:13 +0000)
commitafd67f333466fc67cd37433e45ecdb190efc8f51
tree54bb12e9f2d8d687146f459098e70ff95d2e46e8
parent401d7e5a242f1007c2637a25111a6fa985728c08
[dev.regabi] go/types: no "declared but not used" errors for invalid var decls

This is a port of CL 274615, adapted to go/types. The only change was in
the positioning of expected errors in vardecl.src: in go/types they are
positioned on the identifier.

Change-Id: Iab03265a7c4287749373e4380c6db6a95f262f30
Reviewed-on: https://go-review.googlesource.com/c/go/+/289712
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/assignments.go
src/go/types/decl.go
src/go/types/testdata/vardecl.src