From 30de0b5ef4dda725f29fbdb88e1429a6dd3ae8cd Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Fri, 10 Nov 2023 18:11:15 -0800 Subject: 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 Reviewed-by: Robert Findley Auto-Submit: Robert Griesemer TryBot-Result: Gopher Robot Reviewed-by: Robert Griesemer --- api/next/63223.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 api/next/63223.txt (limited to 'api') 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 -- cgit v1.2.3-54-g00ecf