]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: print type parameters for Alias tyoes
authorRobert Griesemer <gri@golang.org>
Mon, 23 Sep 2024 17:46:41 +0000 (10:46 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 24 Sep 2024 17:44:11 +0000 (17:44 +0000)
commite3cbda934ce5fa42b324f2042c5ee30a2a2e7c8c
treea528df82bf0b3ec7054f709edc6d00c1a550fdbb
parent43cf73186b9889583f125188938c4d43d25c9ad3
go/types, types2: print type parameters for Alias tyoes

Like for Named types, print type parameters for Alias types.

Add test case for Alias object string to existing test.
To make the test work, factor out the mechanism to set
GOEXPERIMENT=aliastypeparams at test time and use it
for this test as well.

No test case for un-instantiated generic type Alias type
string: there's no existing test framework, the code is
identical as for Named types, and these strings only appear
in tracing output. Tested manually.

Change-Id: I476d04d0b6a7c18b79be1d34a9e3e072941df83f
Reviewed-on: https://go-review.googlesource.com/c/go/+/615195
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Tim King <taking@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/types2/check_test.go
src/cmd/compile/internal/types2/object.go
src/cmd/compile/internal/types2/object_test.go
src/cmd/compile/internal/types2/typestring.go
src/go/types/check_test.go
src/go/types/object.go
src/go/types/object_test.go
src/go/types/typestring.go