diff options
Diffstat (limited to 'src/cmd/compile/internal/typecheck/iimport.go')
-rw-r--r-- | src/cmd/compile/internal/typecheck/iimport.go | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/typecheck/iimport.go b/src/cmd/compile/internal/typecheck/iimport.go index 53576bf725..8c197215d7 100644 --- a/src/cmd/compile/internal/typecheck/iimport.go +++ b/src/cmd/compile/internal/typecheck/iimport.go @@ -592,7 +592,21 @@ func (r *importReader) exoticParam() *types.Field { f.Nname = ir.NewNameAt(pos, sym) } f.SetIsDDD(ddd) - f.Note = r.string() + return f +} + +func (r *importReader) exoticField() *types.Field { + pos := r.pos() + sym := r.exoticSym() + off := r.uint64() + typ := r.exoticType() + note := r.string() + f := types.NewField(pos, sym, typ) + f.Offset = int64(off) + if sym != nil { + f.Nname = ir.NewNameAt(pos, sym) + } + f.Note = note return f } @@ -1202,7 +1216,7 @@ func (r *importReader) node() ir.Node { n.SetType(r.exoticType()) switch op { case ir.ODOT, ir.ODOTPTR, ir.ODOTINTER: - n.Selection = r.exoticParam() + n.Selection = r.exoticField() case ir.ODOTMETH, ir.OCALLPART, ir.OMETHEXPR: // These require a Lookup to link to the correct declaration. rcvrType := expr.Type() |