The issue does not reproduce with Go 1.16.2. I cannot reproduce it with go vet or gotype.go, either, unfortunately. This might be a misuse of the go/types API in Staticcheck, but I couldn't find any mistakes yet.
The problem is that gcimporter is not preserving the constant Kind. We've seen this before: this was fixed in x/tools in https://golang.org/cl/307590, but that fix did not make it in to honnef.co/go/tools.
@dominikh, what is your process for keeping in-sync with x/tools? Is this liable to bite users of staticcheck who may upgrade Go, but not staticcheck?
is it common for users to install older versions of staticcheck
I don't believe so, and officially a Staticcheck release supports the last two releases of Go, and makes no promises about forward compatibility. Pulling in the changes and making a new release should fix the issue.
Presumably this issue can be closed, then?
I'm sorry for making you debug an issue that was ultimately in "my" code.