-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: interface conversion: ast.Expr is *ast.IndexExpr, not *ast.Ident #62
Comments
I haven't looked at supporting generics in unparam yet; my thinking was waiting until go/ssa fully supports them. |
It's up to you, of course, but other SSA analysers, such as |
Note that we don't yet support reporting unused parameters on generic functions, as showed by the TODO in typeparams.txt, but at least we don't panic as quickly as before. Also note that running unparam on std currently panics as well, presumably due to a bug in go/ssa that I will report shortly. Thanks to Ainar Garipov for reporting and Ludovic Fernandez for suggesting a fix. Fixes #62.
Note that we don't yet support reporting unused parameters on generic functions, as showed by the TODO in typeparams.txt, but at least we don't panic as quickly as before. Also note that running unparam on std currently panics as well, presumably due to a bug in go/ssa that I will report shortly. Thanks to Ainar Garipov for reporting and Ludovic Fernandez for suggesting a fix. Fixes #62.
Note that we don't yet support reporting unused parameters on generic functions, as showed by the TODO in typeparams.txt, but at least we don't panic as quickly as before. Also note that running unparam on std currently panics as well, presumably due to a bug in go/ssa that I will report shortly. Thanks to Ainar Garipov for reporting and Ludovic Fernandez for suggesting a fix. Note that we need to use x/exp/typeparams to keep support for Go 1.17.x. Fixes #62.
Note that we don't yet support reporting unused parameters on generic functions, as showed by the TODO in typeparams.txt, but at least we don't panic as quickly as before. Also note that running unparam on std currently panics as well, presumably due to a bug in go/ssa that I will report shortly. Thanks to Ainar Garipov for reporting and Ludovic Fernandez for suggesting a fix. Note that we need to use x/exp/typeparams to keep support for Go 1.17.x. Fixes #62.
Note that we don't yet support reporting unused parameters on generic functions, as showed by the TODO in typeparams.txt, but at least we don't panic as quickly as before. Also note that running unparam on std currently panics as well, presumably due to a bug in go/ssa that I will report shortly. Thanks to Ainar Garipov for reporting and Ludovic Fernandez for suggesting a fix. Note that we need to use x/exp/typeparams to keep support for Go 1.17.x. Fixes #62.
Pardon for not reviewing in time. I don't have the original code that triggered the issue by me right now, but running it on other generic code doesn't panic. |
The generics support in
golang.org/x/tools/go/ssa
seems to be mostly ready (see golang/go#48525 (comment)), so I've updated it to the latestmaster
commit, compiledunparam
, and tried using it on some generic code. The result is a panic:The reproducer code:
Versions:
The text was updated successfully, but these errors were encountered: