From 4e3242e000c9086052d8d700ca255d64e2b9fdfb Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Mon, 25 Apr 2016 14:56:12 -0700 Subject: [PATCH] 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 --- go/gcimporter15/bimport.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/go/gcimporter15/bimport.go b/go/gcimporter15/bimport.go index dc944e86bf..4cae22078a 100644 --- a/go/gcimporter15/bimport.go +++ b/go/gcimporter15/bimport.go @@ -15,6 +15,7 @@ import ( "go/token" "go/types" "sort" + "strings" "unicode" "unicode/utf8" ) @@ -508,6 +509,9 @@ func (p *importer) param(named bool) (*types.Var, bool) { if name == "" { panic("expected named parameter") } + if i := strings.Index(name, "ยท"); i > 0 { + name = name[:i] // cut off gc-specific parameter numbering + } pkg = p.pkg() }