Commit 9150c16b authored by Robert Griesemer's avatar Robert Griesemer
Browse files

cmd/compile/internal/types2: remove asTypeParam and simplify some code

Because we do not permit a stand-alone type parameter on the RHS of
a type declaration, the underlying type of a (Named) type cannot be
a type parameter. This allows us to simplify some code.

Specifically, when parsing union elements, we don't need to delay
a check for later, which allows further simplifications when computing
type sets.

Change-Id: I4047c609f87ebb194ea8c1bad630a70d255b20cf
Reviewed-on: https://go-review.googlesource.com/c/go/+/363438


Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarRobert Findley <rfindley@google.com>
parent 36345947
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment