-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
go/types: tip: math/all_test.go:1963:2: constant overflow #45874
Comments
I think the problem is #45837 Your "honnef.co/go/tools/go/loader" use |
Thanks for reporting, and for the repro. @cuonglm may be right -- I'll take a look. |
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? |
To clarify: is it common for users to install older versions of staticcheck, or do you see any other reasons why this problem is not fixable? |
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. |
No problem at all. This overflow check was a change in behavior in go/types (arguably a bug fix), and I wanted to understand its ramifications. Yes, I think this can be closed now. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
No.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://play.golang.org/p/9NB6JwDlteB
The issue does not reproduce with Go 1.16.2. I cannot reproduce it with
go vet
orgotype.go
, either, unfortunately. This might be a misuse of the go/types API in Staticcheck, but I couldn't find any mistakes yet.git bisect
points at 168d6a4 (/cc @findleyr)What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: