]> Cypherpunks repositories - gostls13.git/commit
internal/types/errors: add package
authorRobert Griesemer <gri@golang.org>
Thu, 6 Oct 2022 20:51:52 +0000 (13:51 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 10 Oct 2022 15:20:17 +0000 (15:20 +0000)
commitb440c15db71ba0ac0b995428a52b380814882627
tree469874cc588476a6e531b29346b20aba98c5de22
parent665992b5158c1c851f6e6a1ecb15a166f5ff611e
internal/types/errors: add package

The internal/types/errors package defines all error codes used by
the type checkers. This is the 1st step of several that factor out
the error codes from go/types and types2; the package is not yet
used.

- The file codes.go is a copy of go/types/errorcodes.go. The
  only change is the updated package name (types -> errors).

- The file codes_test.go is a copy of go/types/errorcodes_test.go
  with updated package name (types_test -> errors_test) and minor
  changes to walkCodes so that it doesn't require the pkgFiles
  helper function (the test only parses a single file).

Change-Id: Idb977b1220737b56b330de1d977f698f022daafc
Reviewed-on: https://go-review.googlesource.com/c/go/+/439560
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/internal/types/errors/codes.go [new file with mode: 0644]
src/internal/types/errors/codes_test.go [new file with mode: 0644]