]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile: fix bug with types2.Instantiate with interface type...
authorDan Scales <danscales@google.com>
Wed, 7 Jul 2021 19:03:41 +0000 (12:03 -0700)
committerDan Scales <danscales@google.com>
Wed, 7 Jul 2021 22:57:23 +0000 (22:57 +0000)
commit60cb2cab97ca6a28dcb4a58776ed85f840f534d5
tree5b5bcfe088089e1624eb13ebe7210ae95df2319a
parent85267f402c3ba7ec91a3cf5e4e4a763fd1137deb
[dev.typeparams] cmd/compile: fix bug with types2.Instantiate with interface type param

types2.subst has an assertion that check is non-nil, but which breaks
Instantiate() with an interface type param (used when re-importing
instatiated type to types2). But this check was added when Instantiate()
was added, and things seem to work fine when the assertion is removed.

Fixes test/typeparam/mdempsky/7.go.

Change-Id: I4980f0b202a0b310a3c91a7a87f97576f54911de
Reviewed-on: https://go-review.googlesource.com/c/go/+/333155
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
src/cmd/compile/internal/types2/subst.go
test/run.go