go/gcimporter15: adopt changes from golang.org/cl/22714

Fixes x/tools build.

Change-Id: Ifd958ff1293ec2c4fd971813ae7b199b5d8244fe
Reviewed-on: https://go-review.googlesource.com/22721
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Robert Griesemer 2016-05-03 08:58:41 -07:00
parent c9a2436076
commit 8dab6f1129
2 changed files with 8 additions and 3 deletions

View File

@ -490,8 +490,11 @@ func (p *exporter) paramList(params *types.Tuple, variadic bool) {
} }
p.typ(t) p.typ(t)
if n > 0 { if n > 0 {
p.string(q.Name()) name := q.Name()
p.pkg(q.Pkg(), false) p.string(name)
if name != "_" {
p.pkg(q.Pkg(), false)
}
} }
p.string("") // no compiler-specific info p.string("") // no compiler-specific info
} }

View File

@ -510,10 +510,12 @@ func (p *importer) param(named bool) (*types.Var, bool) {
if name == "" { if name == "" {
panic("expected named parameter") panic("expected named parameter")
} }
if name != "_" {
pkg = p.pkg()
}
if i := strings.Index(name, "·"); i > 0 { if i := strings.Index(name, "·"); i > 0 {
name = name[:i] // cut off gc-specific parameter numbering name = name[:i] // cut off gc-specific parameter numbering
} }
pkg = p.pkg()
} }
// read and discard compiler-specific info // read and discard compiler-specific info