message/pipeline: add two Unalias calls
Change-Id: I692c027e2b97ee5509a63a2c88265759fc766800
Reviewed-on: https://go-review.googlesource.com/c/text/+/645016
Auto-Submit: Alan Donovan <adonovan@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
diff --git a/message/pipeline/extract.go b/message/pipeline/extract.go
index a15a7f9..23e58f0 100644
--- a/message/pipeline/extract.go
+++ b/message/pipeline/extract.go
@@ -148,13 +148,13 @@
}
t := a.Type()
for {
- p, ok := t.(*types.Pointer)
+ p, ok := types.Unalias(t).(*types.Pointer)
if !ok {
break
}
t = p.Elem()
}
- if b, ok := t.(*types.Basic); !ok || b.Kind() != types.String {
+ if b, ok := types.Unalias(t).(*types.Basic); !ok || b.Kind() != types.String {
continue
}
x.visitInit(a, s.Val)