diff --git a/go/pointer/pointer_test.go b/go/pointer/pointer_test.go index 2ea7ef6c58e..8dfce96b743 100644 --- a/go/pointer/pointer_test.go +++ b/go/pointer/pointer_test.go @@ -12,7 +12,6 @@ import ( "bytes" "errors" "fmt" - "go/parser" "go/token" "io/ioutil" "os" @@ -240,15 +239,7 @@ func doOneInput(input, filename string) bool { for _, typstr := range split(rest, "|") { var t types.Type = types.Typ[types.Invalid] // means "..." if typstr != "..." { - texpr, err := parser.ParseExpr(typstr) - if err != nil { - ok = false - // Don't print err since its location is bad. - e.errorf("'%s' is not a valid type", typstr) - continue - } - mainFileScope := mainpkg.Object.Scope().Child(0) - tv, err := types.EvalNode(prog.Fset, texpr, mainpkg.Object, mainFileScope) + tv, err := types.Eval(prog.Fset, mainpkg.Object, f.Pos(), typstr) if err != nil { ok = false // Don't print err since its location is bad. diff --git a/go/pointer/reflect.go b/go/pointer/reflect.go index 7e9c280cc84..466995c6af4 100644 --- a/go/pointer/reflect.go +++ b/go/pointer/reflect.go @@ -1849,7 +1849,7 @@ func changeRecv(sig *types.Signature) *types.Signature { for i := 0; i < n; i++ { p2[i+1] = params.At(i) } - return types.NewSignature(nil, nil, types.NewTuple(p2...), sig.Results(), sig.Variadic()) + return types.NewSignature(nil, types.NewTuple(p2...), sig.Results(), sig.Variadic()) } func (c *rtypeMethodByNameConstraint) solve(a *analysis, delta *nodeset) {