Skip to content

Commit

Permalink
internal/types: fix the iota value in error code declarations
Browse files Browse the repository at this point in the history
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 <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
findleyr authored and gopherbot committed Nov 10, 2022
1 parent d3726f3 commit 271f139
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/internal/types/errors/codes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 271f139

Please sign in to comment.