From 1e59086680cc4c90cd7e9a2f5fcf98043df4396c Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Tue, 28 Jan 2025 12:49:59 -0500 Subject: [PATCH] message/pipeline: add two Unalias calls Change-Id: I692c027e2b97ee5509a63a2c88265759fc766800 Reviewed-on: https://go-review.googlesource.com/c/text/+/645016 Auto-Submit: Alan Donovan LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor --- message/pipeline/extract.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/message/pipeline/extract.go b/message/pipeline/extract.go index a15a7f9d3..23e58f021 100644 --- a/message/pipeline/extract.go +++ b/message/pipeline/extract.go @@ -148,13 +148,13 @@ func (x *extracter) processGlobalVars() { } 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)