]> Cypherpunks repositories - gostls13.git/commit
internal/types/errors: add InvalidSyntaxTree error
authorRobert Griesemer <gri@golang.org>
Fri, 7 Oct 2022 00:47:13 +0000 (17:47 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 10 Oct 2022 16:02:27 +0000 (16:02 +0000)
commit578523e4a0f68e9b35984f017bb3471b0bd313b4
treefa1ea60e8a10fce29d0906d6880b7a339c4b99a1
parent6688efd5df1ef82dbe5d1f47b4c9bf4321a44126
internal/types/errors: add InvalidSyntaxTree error

Type checkers should use InvalidSyntaxTree as error code
for invalid syntax tree errors instead of zero. This way
the zero value can be used to mark an unset error code.

Also, add an example for BlankPkgName (and adjust the
test harness slightly to make it work).

Change-Id: Ic15fa0e8e46be698e52352f2f0e4915b75e509d7
Reviewed-on: https://go-review.googlesource.com/c/go/+/439565
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/internal/types/errors/codes.go
src/internal/types/errors/codes_test.go