Skip to content

Commit 8dab6f1

Browse files
committed
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 <[email protected]>
1 parent c9a2436 commit 8dab6f1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

go/gcimporter15/bexport.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,11 @@ func (p *exporter) paramList(params *types.Tuple, variadic bool) {
490490
}
491491
p.typ(t)
492492
if n > 0 {
493-
p.string(q.Name())
494-
p.pkg(q.Pkg(), false)
493+
name := q.Name()
494+
p.string(name)
495+
if name != "_" {
496+
p.pkg(q.Pkg(), false)
497+
}
495498
}
496499
p.string("") // no compiler-specific info
497500
}

go/gcimporter15/bimport.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,12 @@ func (p *importer) param(named bool) (*types.Var, bool) {
510510
if name == "" {
511511
panic("expected named parameter")
512512
}
513+
if name != "_" {
514+
pkg = p.pkg()
515+
}
513516
if i := strings.Index(name, "·"); i > 0 {
514517
name = name[:i] // cut off gc-specific parameter numbering
515518
}
516-
pkg = p.pkg()
517519
}
518520

519521
// read and discard compiler-specific info

0 commit comments

Comments
 (0)