]> Cypherpunks repositories - gostls13.git/commit
go/types: remove unnecessary indirection when reporting errors
authorRobert Findley <rfindley@google.com>
Mon, 18 Apr 2022 20:47:42 +0000 (16:47 -0400)
committerRobert Findley <rfindley@google.com>
Fri, 22 Apr 2022 15:44:57 +0000 (15:44 +0000)
commit1899472647513e6a63a95481493c45c579ec0cd8
tree3698d9539bcda76001677bbdad2199d86c594d64
parent507b70d1e879ed51830d1f64f534c685b8ee1b13
go/types: remove unnecessary indirection when reporting errors

Checker.err was only called to report errors created with
Checker.newError or Checker.newErrorf. Update the API to pass around
*Error rather than error, eliminating unnecessary type assertions and
handling.

Change-Id: I995a120c7e87266e656b8ff3fd9ed3d368fd17fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/400823
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
src/go/types/api.go
src/go/types/errors.go