go/internal/gcimporter: fix suppressed gotypesalias=1 tests
https://go.dev/cl/577715 appears to have broken three "long" tests in go/internal/gcimporter. The quick fix is to disable them; this issue tracks a principled fix.
--- FAIL: TestImportTypeparamTests (69.39s)
--- FAIL: TestImportTypeparamTests/issue50259.go (0.04s)
gcimporter_test.go:208: imported "A" as "type A struct{}", want "type A invalid type"
--- FAIL: TestImportTypeparamTests/struct.go (0.35s)
gcimporter_test.go:208: imported "Eint2" as "type Eint2 = E[int]", want "type Eint2 = Eint"
gcimporter_test.go:208: imported "S2" as "type S2 struct{E[int]; E[bool]; v string}", want "type S2 struct{Eint; Ebool; v string}"
Change https://go.dev/cl/579415 mentions this issue: go/internal/gcimporter: suppress 3 test cases when gotypesalias=1
The first error, related to $goroot/test/typeparam/issue50259.go, may possibly be an incorrect type declaration (TBD).
The 2nd and 3rd error, related to $goroot/test/typeparam/struct.go, disappears once the compiler is switched to using Alias types (currently disabled).
Follow-up: the type declaration in $goroot/test/typeparam/issue50259.go looks valid:
var x T[B]
type T[_ any] struct{}
type A T[B]
type B = T[A]
can be written as
var x T[T[A]]
type T[_ any] struct{}
type A T[T[A]]
type B = T[A]
and since A is not used in T these types are ok.
Change https://go.dev/cl/586236 mentions this issue: go/types: re-enable suppressed gcimporter tests