diff --git a/go/gcimporter15/bexport.go b/go/gcimporter15/bexport.go index 9cb46f91..1ceae137 100644 --- a/go/gcimporter15/bexport.go +++ b/go/gcimporter15/bexport.go @@ -490,8 +490,11 @@ func (p *exporter) paramList(params *types.Tuple, variadic bool) { } p.typ(t) if n > 0 { - p.string(q.Name()) - p.pkg(q.Pkg(), false) + name := q.Name() + p.string(name) + if name != "_" { + p.pkg(q.Pkg(), false) + } } p.string("") // no compiler-specific info } diff --git a/go/gcimporter15/bimport.go b/go/gcimporter15/bimport.go index 22a6f605..a742dbfd 100644 --- a/go/gcimporter15/bimport.go +++ b/go/gcimporter15/bimport.go @@ -510,10 +510,12 @@ func (p *importer) param(named bool) (*types.Var, bool) { if name == "" { panic("expected named parameter") } + if name != "_" { + pkg = p.pkg() + } if i := strings.Index(name, "ยท"); i > 0 { name = name[:i] // cut off gc-specific parameter numbering } - pkg = p.pkg() } // read and discard compiler-specific info