You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As reported in #51947 (comment), when using the new types.Config.GoVersion field with a Go version < 1.13, go/types produces inaccurate errors for untyped shift operands, as in the following code from go-cmp:
This is a new regression, only reachable via use of the GoVersion field, but it newly affects gopls because we are now setting the GoVersion field based on go.mod, and go-cmp still has go1.11 in their go.mod.
The fix looks straightforward but shifts are notoriously tricky and have been a source of a significant number of bugs in the past. Nevertheless, we should endeavor to fix this regression for Go 1.18.1.
As reported in #51947 (comment), when using the new
types.Config.GoVersion
field with a Go version < 1.13,go/types
produces inaccurate errors for untyped shift operands, as in the following code from go-cmp:This is a new regression, only reachable via use of the
GoVersion
field, but it newly affects gopls because we are now setting theGoVersion
field based ongo.mod
, andgo-cmp
still has go1.11 in theirgo.mod
.The fix looks straightforward but shifts are notoriously tricky and have been a source of a significant number of bugs in the past. Nevertheless, we should endeavor to fix this regression for Go 1.18.1.
CC @griesemer
The text was updated successfully, but these errors were encountered: