From 271f139f17c8ec5895bde52dac4056f99768e258 Mon Sep 17 00:00:00 2001 From: Robert Findley Date: Thu, 10 Nov 2022 11:15:26 -0500 Subject: [PATCH] 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 Auto-Submit: Robert Findley Reviewed-by: Robert Griesemer TryBot-Result: Gopher Robot --- src/internal/types/errors/codes.go | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.48.1