mirror of
https://github.com/golang/go
synced 2024-11-23 22:20:02 -07:00
cmd/compile: NewSelectorExpr use n.Pos instead of base.Pos
Fixes #49436 Change-Id: I4c8851e7aaee631d5eb22f2ef0aea5a25e936d87 Reviewed-on: https://go-review.googlesource.com/c/go/+/361917 Run-TryBot: Dan Scales <danscales@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> Trust: David Chase <drchase@google.com>
This commit is contained in:
parent
f59d36d2e3
commit
d3aedb72c6
@ -160,7 +160,7 @@ func AddImplicitDots(n *ir.SelectorExpr) *ir.SelectorExpr {
|
||||
case path != nil:
|
||||
// rebuild elided dots
|
||||
for c := len(path) - 1; c >= 0; c-- {
|
||||
dot := ir.NewSelectorExpr(base.Pos, ir.ODOT, n.X, path[c].field.Sym)
|
||||
dot := ir.NewSelectorExpr(n.Pos(), ir.ODOT, n.X, path[c].field.Sym)
|
||||
dot.SetImplicit(true)
|
||||
dot.SetType(path[c].field.Type)
|
||||
n.X = dot
|
||||
|
Loading…
Reference in New Issue
Block a user