@@ -18,7 +18,6 @@ import (
1818 "strings"
1919
2020 "golang.org/x/tools/go/types/typeutil"
21- "golang.org/x/tools/internal/astutil"
2221 "golang.org/x/tools/internal/typeparams"
2322 "golang.org/x/tools/internal/typesinternal"
2423)
@@ -145,7 +144,7 @@ func AnalyzeCallee(logf func(string, ...any), fset *token.FileSet, pkg *types.Pa
145144 var f func (n ast.Node , stack []ast.Node ) bool
146145 var stack []ast.Node
147146 stack = append (stack , decl .Type ) // for scope of function itself
148- visit := func (n ast.Node , stack []ast.Node ) { astutil .PreorderStack (n , stack , f ) }
147+ visit := func (n ast.Node , stack []ast.Node ) { ast .PreorderStack (n , stack , f ) }
149148 f = func (n ast.Node , stack []ast.Node ) bool {
150149 switch n := n .(type ) {
151150 case * ast.SelectorExpr :
@@ -469,7 +468,7 @@ func analyzeParams(logf func(string, ...any), fset *token.FileSet, info *types.I
469468 fieldObjs := fieldObjs (sig )
470469 var stack []ast.Node
471470 stack = append (stack , decl .Type ) // for scope of function itself
472- astutil .PreorderStack (decl .Body , stack , func (n ast.Node , stack []ast.Node ) bool {
471+ ast .PreorderStack (decl .Body , stack , func (n ast.Node , stack []ast.Node ) bool {
473472 if id , ok := n .(* ast.Ident ); ok {
474473 if v , ok := info .Uses [id ].(* types.Var ); ok {
475474 if pinfo , ok := paramInfos [v ]; ok {
@@ -533,7 +532,7 @@ func analyzeTypeParams(_ logger, fset *token.FileSet, info *types.Info, decl *as
533532 // TODO(jba): can we nevertheless combine this with the traversal in analyzeParams?
534533 var stack []ast.Node
535534 stack = append (stack , decl .Type ) // for scope of function itself
536- astutil .PreorderStack (decl .Body , stack , func (n ast.Node , stack []ast.Node ) bool {
535+ ast .PreorderStack (decl .Body , stack , func (n ast.Node , stack []ast.Node ) bool {
537536 if id , ok := n .(* ast.Ident ); ok {
538537 if v , ok := info .Uses [id ].(* types.TypeName ); ok {
539538 if pinfo , ok := paramInfos [v ]; ok {
0 commit comments