]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/api: handle types.Alias
authorAlan Donovan <adonovan@google.com>
Tue, 9 Apr 2024 19:35:11 +0000 (15:35 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 9 Apr 2024 20:48:51 +0000 (20:48 +0000)
This is covered by the existing tests under gotypesalias=1.

Change-Id: Ia17f35fe580b745fa4bdaf4689dfe9c2ed6ebc5b
Reviewed-on: https://go-review.googlesource.com/c/go/+/577735
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Alan Donovan <adonovan@google.com>

src/cmd/api/main_test.go

index 0a3d44ddd0aaaab76c4e4d3b8b0ed84e91d287b2..b071ef5f9970d363344e015ba2057100805e4878 100644 (file)
@@ -843,6 +843,9 @@ func (w *Walker) writeType(buf *bytes.Buffer, typ types.Type) {
                buf.WriteString(s)
                w.writeType(buf, typ.Elem())
 
+       case *types.Alias:
+               w.writeType(buf, types.Unalias(typ))
+
        case *types.Named:
                obj := typ.Obj()
                pkg := obj.Pkg()