Commit 7ba12c16 authored by Matthew Dempsky's avatar Matthew Dempsky

go/internal/gcimporter: add unit tests for blank parameter names

cmd/compile internally rewrites blank return parameters to "~bN". Add
a test to make sure this isn't exposed via the go/types API.

Change-Id: I319644dc5adf483ed30520fd8e9d88cf5cea9751
Reviewed-on: https://go-review.googlesource.com/107616
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent fc215989
......@@ -207,6 +207,8 @@ var importedObjectTests = []struct {
{"go/types.Comparable", "func Comparable(T Type) bool"},
{"math.Pi", "const Pi untyped float"},
{"math.Sin", "func Sin(x float64) float64"},
{"go/ast.NotNilFilter", "func NotNilFilter(_ string, v reflect.Value) bool"},
{"go/internal/gcimporter.BImportData", "func BImportData(fset *go/token.FileSet, imports map[string]*go/types.Package, data []byte, path string) (_ int, pkg *go/types.Package, err error)"},
// interfaces
{"context.Context", "type Context interface{Deadline() (deadline time.Time, ok bool); Done() <-chan struct{}; Err() error; Value(key interface{}) interface{}}"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment