diff options
| author | Robert Findley <rfindley@google.com> | 2022-11-10 11:15:26 -0500 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2022-11-10 16:34:05 +0000 |
| commit | 271f139f17c8ec5895bde52dac4056f99768e258 (patch) | |
| tree | 0a0ac8a808d900e90bc316669214b2e7589ca6ec /src | |
| parent | d3726f346925e8a6ef30b2db9de013fa314492e2 (diff) | |
| download | go-271f139f17c8ec5895bde52dac4056f99768e258.tar.xz | |
internal/types: fix the iota value in error code declarations
The new "InvalidSyntaxTree" node in the error code declaration
inadvertently incremented the value of iota by 1. Fix this by moving it
to its own declaration.
Change-Id: I34b33a8caddbbb9e41f431321ec0e5863dc15055
Reviewed-on: https://go-review.googlesource.com/c/go/+/449475
Run-TryBot: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src')
| -rw-r--r-- | src/internal/types/errors/codes.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/internal/types/errors/codes.go b/src/internal/types/errors/codes.go index 8c0273571f..7bf7b218bd 100644 --- a/src/internal/types/errors/codes.go +++ b/src/internal/types/errors/codes.go @@ -34,7 +34,9 @@ const ( // InvalidSyntaxTree occurs if an invalid syntax tree is provided // to the type checker. It should never happen. InvalidSyntaxTree Code = -1 +) +const ( // The zero Code value indicates an unset (invalid) error code. _ Code = iota |
