Open LittleKey opened 1 month ago
Fixed by myself(casual): for everyone who has same problem before official fixed it
internal/wire/copyast.go | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/internal/wire/copyast.go b/internal/wire/copyast.go
index 179d1c6..9ec63d7 100644
--- a/internal/wire/copyast.go
+++ b/internal/wire/copyast.go
@@ -263,6 +263,13 @@ func copyAST(original ast.Node) ast.Node {
Index: exprFromMap(m, node.Index),
Rbrack: node.Rbrack,
}
+ case *ast.IndexListExpr:
+ m[node] = &ast.IndexListExpr{
+ X: exprFromMap(m, node.X),
+ Lbrack: node.Lbrack,
+ Indices: copyExprList(m, node.Indices),
+ Rbrack: node.Rbrack,
+ }
case *ast.InterfaceType:
m[node] = &ast.InterfaceType{
Interface: node.Interface,
Make a pull request, please.
Already has a fixed PR, but has been reverted. @burik666
Related:
Describe the bug
got panic error when build code with more than 1 generic type parameters
To Reproduce
wire gen with above code:
wire gen
Expected behavior
do not panic and generate code as well
Version
latest: v0.6.0
Additional context
Work well when use only 1 generic type parameter, like below: