Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71756c7

Browse files
kolyshkingopherbot
authored andcommitted
internal/refactor/inline: rm unused code
The funcHasTypeParam is not used since CL 666716. Change-Id: I1e9563a38d740870e5450bb1e543ecdb201f46b1 Reviewed-on: https://go-review.googlesource.com/c/tools/+/702519 Auto-Submit: Kirill Kolyshkin <[email protected]> Commit-Queue: Alan Donovan <[email protected]> Reviewed-by: Alan Donovan <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Alan Donovan <[email protected]> Reviewed-by: Robert Findley <[email protected]>
1 parent 63d9781 commit 71756c7

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

internal/refactor/inline/util.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,6 @@ func checkInfoFields(info *types.Info) {
9999
assert(info.Uses != nil, "types.Info.Uses is nil")
100100
}
101101

102-
func funcHasTypeParams(decl *ast.FuncDecl) bool {
103-
// generic function?
104-
if decl.Type.TypeParams != nil {
105-
return true
106-
}
107-
// method on generic type?
108-
if decl.Recv != nil {
109-
t := decl.Recv.List[0].Type
110-
if u, ok := t.(*ast.StarExpr); ok {
111-
t = u.X
112-
}
113-
return is[*ast.IndexExpr](t) || is[*ast.IndexListExpr](t)
114-
}
115-
return false
116-
}
117-
118102
// intersects reports whether the maps' key sets intersect.
119103
func intersects[K comparable, T1, T2 any](x map[K]T1, y map[K]T2) bool {
120104
if len(x) > len(y) {

0 commit comments

Comments
 (0)