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
This is working as intended. The Go spec says that the default type for integer constant expressions is "int", which on the Go playground is a 32-bit type and is unable to exactly represent the constant 1<<31. The compiler isn't picking a wider type because the spec doesn't allow it to.
http://play.golang.org/p/XRZe_kcHav
http://play.golang.org/p/s9SX9Wd-PY
"constant 2147483648 overflows int"
Why doesn't the compiler pick a wider type, then?
The text was updated successfully, but these errors were encountered: