]> Cypherpunks repositories - gostls13.git/commit
go/internal/gcimporter: add support for importing parameterized types
authorRobert Findley <rfindley@google.com>
Wed, 1 Sep 2021 18:15:05 +0000 (14:15 -0400)
committerRobert Findley <rfindley@google.com>
Thu, 2 Sep 2021 14:02:42 +0000 (14:02 +0000)
commitb8420baf4610e71f6893f7e8b1ad2b6aa94f3eef
tree770362816ed1e614981c67ae6eb0e688a5647fbe
parent4591f49938aedbbac7a24225047984479abe72b8
go/internal/gcimporter: add support for importing parameterized types

Port the necessary logic to go/internal/gcimporter from
cmd/compile/internal/importer/iimport.go to support type parameters.

This is a partial port of several compiler CLs: at least CL 319930,
CL 322609, CL 323029, CL 338192, CL 340251, and CL 340989. Because these
ports were not interleaved with the corresponding go/types API changes,
it is easier to just take the latest importer logic.

Notably, the equivalent of types2.AsTypeParam is not used. It should be
unnecessary.

Updates #48101

Change-Id: I938bd8debc3f6a68a3ad8d44c61ef9c5038be7e5
Reviewed-on: https://go-review.googlesource.com/c/go/+/347069
Trust: Robert Findley <rfindley@google.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/internal/gcimporter/gcimporter_test.go
src/go/internal/gcimporter/iimport.go