]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use Structure() to get single underlying type of typeparam.
authorDan Scales <danscales@google.com>
Thu, 28 Oct 2021 02:16:27 +0000 (19:16 -0700)
committerDan Scales <danscales@google.com>
Fri, 29 Oct 2021 23:25:18 +0000 (23:25 +0000)
commit5d6d9f5610066584374c2dfe7624fa9f251089a0
tree8f19fa21d4541616c549ec54695b7227cb332e5e
parent8dfb4472318e151656f77623e8cabdca290c22fb
cmd/compile: use Structure() to get single underlying type of typeparam.

Use types2.Structure() to get single underlying type of typeparams, to
handle some unusual cases where a type param is constrained to a single
underlying struct or map type.

Fixes #48538

Change-Id: I289fb7b31d489f7586f2b04aeb1df74e15a9f965
Reviewed-on: https://go-review.googlesource.com/c/go/+/359335
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/noder/expr.go
test/run.go
test/typeparam/issue48538.go [new file with mode: 0644]