]> Cypherpunks repositories - gostls13.git/commit
go/types: return an error from Instantiate
authorRobert Findley <rfindley@google.com>
Mon, 16 Aug 2021 20:40:57 +0000 (16:40 -0400)
committerRobert Findley <rfindley@google.com>
Mon, 23 Aug 2021 12:26:30 +0000 (12:26 +0000)
commitc7e354d9d1975a3e55c8eb9e79c22106c4b770c4
treeb11fd691f2c270f3cbb40daa8432c9a0140c71eb
parentc1a14781eca85e9c705c782aa2071a5f9c23c09e
go/types: return an error from Instantiate

This is a port of CL 342152 to go/types. Additionally, a panic was
removed from interface substitution, which is a fix from CL 333155 that
was previously missed.

A check for a nil Checker was also removed from types2.instantiate,
since check must not be nil in that method.

Change-Id: I4ea6bdccbd50ea2008ee6d870f702bee5cdd5a8e
Reviewed-on: https://go-review.googlesource.com/c/go/+/342671
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/types2/instantiate.go
src/go/types/api.go
src/go/types/api_test.go
src/go/types/call.go
src/go/types/instantiate.go
src/go/types/named.go
src/go/types/subst.go
src/go/types/typexpr.go