go/internal/gcimporter: add import tests for type parameters
Add a new test TestImportTypeparamTests that compiles and imports
packages contained in test/typeparam, and compares the resulting package
scope with the scope produced by type-checking directly.
In the process, fix a bug in go/types affecting embedded instances with
more than one type argument. This was uncovered by smoketest.go.
To enable this new test it was easiest to move gcimporter_test.go to an
external test, which required copying the pkgExts variable.
Fixes #48101
Change-Id: Ie4d981bf463e886a8d141809805d184dbbf64607
Reviewed-on: https://go-review.googlesource.com/c/go/+/347070
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>