diff options
Diffstat (limited to 'src/cmd/compile/internal/typecheck/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/iimport.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index 37f5a7bba0..623916034e 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -1222,12 +1222,14 @@ func (r *importReader) node() ir.Node { switch op { case ir.ODOT, ir.ODOTPTR, ir.ODOTINTER: n.Selection = r.exoticField() - case ir.ODOTMETH, ir.OCALLPART, ir.OMETHEXPR: + case ir.OMETHEXPR: + n = typecheckMethodExpr(n).(*ir.SelectorExpr) + case ir.ODOTMETH, ir.OCALLPART: // These require a Lookup to link to the correct declaration. rcvrType := expr.Type() typ := n.Type() n.Selection = Lookdot(n, rcvrType, 1) - if op == ir.OCALLPART || op == ir.OMETHEXPR { + if op == ir.OCALLPART { // Lookdot clobbers the opcode and type, undo that. n.SetOp(op) n.SetType(typ) |