Skip to content

Commit

Permalink
[dev.unified] cmd/compile/internal/reflectdata: prefer ITabAddrAt in …
Browse files Browse the repository at this point in the history
…ConvIfaceTypeWord

We already have an explicit `pos` parameter, so we should use
ITabAddrAt instead of ITabAddr (which uses `base.Pos` instead).

Change-Id: I7c8c5ae93d0ae7a6467cc972575cb547981576f0
Reviewed-on: https://go-review.googlesource.com/c/go/+/415578
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
  • Loading branch information
mdempsky committed Jul 18, 2022
1 parent 9371a65 commit 2cf632c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/compile/internal/reflectdata/helpers.go
Expand Up @@ -113,7 +113,7 @@ func ConvIfaceTypeWord(pos src.XPos, n *ir.ConvExpr) ir.Node {
return concreteRType(pos, src) // direct eface construction
}
if !src.IsInterface() {
return ITabAddr(src, dst) // direct iface construction
return ITabAddrAt(pos, src, dst) // direct iface construction
}
return TypePtrAt(pos, dst) // convI2I
}
Expand Down

0 comments on commit 2cf632c

Please sign in to comment.