diff options
author | Robert Griesemer <gri@golang.org> | 2023-11-10 18:11:15 -0800 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-11-13 20:18:45 +0000 |
commit | 30de0b5ef4dda725f29fbdb88e1429a6dd3ae8cd (patch) | |
tree | 413ccc3c257772cb099033677c78a2874d7f86c2 /api | |
parent | 42bd21be1cf54876ce24c489852721049ef293e2 (diff) | |
download | go-30de0b5ef4dda725f29fbdb88e1429a6dd3ae8cd.tar.gz go-30de0b5ef4dda725f29fbdb88e1429a6dd3ae8cd.zip |
go/types, types2: implement Alias proposal (export API)
This CL exports the previously unexported Alias type and
corresponding functions and methods per issue #63223.
Whether Alias types are used or not is controlled by
the gotypesalias setting with the GODEBUG environment
variable. Setting gotypesalias to "1" enables the Alias
types:
GODEBUG=gotypesalias=1
By default, gotypesalias is not set.
Adjust test cases that enable/disable the use of Alias
types to use -gotypesalias=1 or -gotypesalias=0 rather
than -alias and -alias=false for consistency and to
avoid confusion.
For #63223.
Change-Id: I51308cad3320981afac97dd8c6f6a416fdb0be55
Reviewed-on: https://go-review.googlesource.com/c/go/+/541737
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/next/63223.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/api/next/63223.txt b/api/next/63223.txt new file mode 100644 index 0000000000..2dcafb872b --- /dev/null +++ b/api/next/63223.txt @@ -0,0 +1,6 @@ +pkg go/types, func NewAlias(*TypeName, Type) *Alias #63223 +pkg go/types, func Unalias(Type) Type #63223 +pkg go/types, method (*Alias) Obj() *TypeName #63223 +pkg go/types, method (*Alias) String() string #63223 +pkg go/types, method (*Alias) Underlying() Type #63223 +pkg go/types, type Alias struct #63223 |