We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For
package main const X = 1 func main() { var _ uint = X }
we currently emit
sand.go:6:8: could omit type uint from declaration; it will be inferred from the right-hand side (QF1011)
which is clearly wrong. X is an untyped constant, and without the explicit uint, it will default to int.
uint
int
The issue lies with how we check the type of the RHS. The type-checker "helpfully" types that use of X for us, based on its context.
(This bug feels very familiar, I think we've fixed pretty much the same issue in another check recently.)
The text was updated successfully, but these errors were encountered:
555ca7a
No branches or pull requests
For
we currently emit
which is clearly wrong. X is an untyped constant, and without the explicit
uint
, it will default toint
.The issue lies with how we check the type of the RHS. The type-checker "helpfully" types that use of X for us, based on its context.
(This bug feels very familiar, I think we've fixed pretty much the same issue in another check recently.)
The text was updated successfully, but these errors were encountered: