diff --git a/builtin_test.go b/builtin_test.go index d2586fe3..b4271e10 100644 --- a/builtin_test.go +++ b/builtin_test.go @@ -420,7 +420,7 @@ func TestSubstVar(t *testing.T) { pkg := NewPackage("", "foo", gblConf) a := pkg.NewAutoParam("a") scope := pkg.cb.Scope() - scope.Insert(NewSubstVar(token.NoPos, pkg.Types, "bar", a)) + scope.Insert(NewSubst(token.NoPos, pkg.Types, "bar", a)) o := Lookup(scope, "bar") if o != a { t.Fatal("TestSubstVar:", o) diff --git a/type_var_and_const.go b/type_var_and_const.go index ca45e6f2..2f19c9a6 100644 --- a/type_var_and_const.go +++ b/type_var_and_const.go @@ -782,7 +782,7 @@ func (p *SubstType) String() string { return fmt.Sprintf("substType{real: %v}", p.Real) } -func NewSubstVar(pos token.Pos, pkg *types.Package, name string, real types.Object) *types.Var { +func NewSubst(pos token.Pos, pkg *types.Package, name string, real types.Object) *types.Var { return types.NewVar(pos, pkg, name, &SubstType{Real: real}) }