Closed Foxboron closed 7 months ago
I also see panics when trying to use the latest release binaries with Go 1.22.0:
$ ./staticcheck/staticcheck --version
staticcheck 2023.1.6 (v0.4.6)
$ go version
go version go1.22.0 linux/amd64
$ ./staticcheck/staticcheck ./...
panic: interface conversion: types.Object is nil, not *types.TypeName
goroutine 169 [running]:
honnef.co/go/tools/unused.(*graph).decl(0xc000bcacd0, {0x9fcd78?, 0xc000e58140}, {0x0, 0x0})
honnef.co/go/tools@v0.4.6/unused/unused.go:1089 +0xadb
honnef.co/go/tools/unused.(*graph).entry(0xc000f95cd0)
honnef.co/go/tools@v0.4.6/unused/unused.go:522 +0xc14
honnef.co/go/tools/unused.run(0xc000538ea0)
honnef.co/go/tools@v0.4.6/unused/unused.go:218 +0x225
honnef.co/go/tools/lintcmd/runner.(*analyzerRunner).do(0xc000b19050, {0x9fe6a8?, 0xc000bdb220})
honnef.co/go/tools@v0.4.6/lintcmd/runner/runner.go:992 +0x6fd
honnef.co/go/tools/lintcmd/runner.genericHandle({0x9fe6a8?, 0xc000bdb220}, {0x9fe6a8?, 0xc000274be0?}, 0x0?, 0xc000455850, 0xc000b8b9a0)
honnef.co/go/tools@v0.4.6/lintcmd/runner/runner.go:817 +0x129
created by honnef.co/go/tools/lintcmd/runner.(*subrunner).runAnalyzers in goroutine 131
honnef.co/go/tools@v0.4.6/lintcmd/runner/runner.go:1061 +0x6b5
On second thought, I think my panic is unrelated, so I've raised https://github.com/dominikh/go-tools/issues/1496.
@dominikh Thanks!
Originally encountered while rebuilding
staticcheck
towards the new Go version, but test suite fails :)Test suite crash