Skip to content

Commit

Permalink
rename NewSubstVar => NewSubst
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed May 7, 2022
1 parent 501e2d5 commit aca7217
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion type_var_and_const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})
}

Expand Down

0 comments on commit aca7217

Please sign in to comment.