go/gcimporter: cut off any gc-specific parameter numbering
Matching pending CL https://golang.org/cl/22441/. Change-Id: I96fab1da7abfeb8f22ce680183649dfa4b84d461 Reviewed-on: https://go-review.googlesource.com/22442 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
487c81ee33
commit
4e3242e000
|
@ -15,6 +15,7 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"go/types"
|
"go/types"
|
||||||
"sort"
|
"sort"
|
||||||
|
"strings"
|
||||||
"unicode"
|
"unicode"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
)
|
)
|
||||||
|
@ -508,6 +509,9 @@ func (p *importer) param(named bool) (*types.Var, bool) {
|
||||||
if name == "" {
|
if name == "" {
|
||||||
panic("expected named parameter")
|
panic("expected named parameter")
|
||||||
}
|
}
|
||||||
|
if i := strings.Index(name, "·"); i > 0 {
|
||||||
|
name = name[:i] // cut off gc-specific parameter numbering
|
||||||
|
}
|
||||||
pkg = p.pkg()
|
pkg = p.pkg()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue