File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 6
6
"go/token"
7
7
"reflect"
8
8
"strings"
9
+
10
+ "golang.org/x/exp/typeparams"
9
11
)
10
12
11
13
func IsIdent (expr ast.Expr , ident string ) bool {
@@ -130,7 +132,7 @@ func CopyExpr(node ast.Expr) (ast.Expr, bool) {
130
132
cp .X , ok1 = CopyExpr (cp .X )
131
133
cp .Index , ok2 = CopyExpr (cp .Index )
132
134
return & cp , ok1 && ok2
133
- case * ast .IndexListExpr :
135
+ case * typeparams .IndexListExpr :
134
136
var ok bool
135
137
cp := * node
136
138
cp .X , ok = CopyExpr (cp .X )
@@ -278,8 +280,8 @@ func Equal(a, b ast.Node) bool {
278
280
case * ast.IndexExpr :
279
281
b := b .(* ast.IndexExpr )
280
282
return Equal (a .X , b .X ) && Equal (a .Index , b .Index )
281
- case * ast .IndexListExpr :
282
- b := b .(* ast .IndexListExpr )
283
+ case * typeparams .IndexListExpr :
284
+ b := b .(* typeparams .IndexListExpr )
283
285
if len (a .Indices ) != len (b .Indices ) {
284
286
return false
285
287
}
You can’t perform that action at this time.
0 commit comments