]> Cypherpunks repositories - gostls13.git/commit
go/types: use function name position for init errors
authorRobert Griesemer <gri@golang.org>
Fri, 2 Sep 2022 03:47:41 +0000 (20:47 -0700)
committerRobert Griesemer <gri@google.com>
Fri, 2 Sep 2022 16:43:15 +0000 (16:43 +0000)
commit5befb24bb5cbd8ae6210b4d6a88a4437eec6fb0b
tree0aa8d0dd3ad8df98234ed29bd2da16cec27515be
parent321a220d506fe1445302706f1725017a42fc1510
go/types: use function name position for init errors

This seems more sensible than the func keyword. With this change,
go/types uses the same error position as types2 and we can narrow
the error tolerance a bit.

(The types2 change doesn't change its position, but it makes the
code clearer and symmetric to go/types.)

Change-Id: Iedea7c80caa7239a4343c8748cb779ec545e84d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/427775
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
src/cmd/compile/internal/types2/check_test.go
src/cmd/compile/internal/types2/resolver.go
src/go/types/resolver.go
src/internal/types/testdata/check/decls1.go
src/internal/types/testdata/check/main0.go