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
Per https://go.dev/ref/spec#Conversions, “In all non-constant conversions involving floating-point or complex values, if the result type cannot represent the value the conversion succeeds but the result value is implementation-dependent.”
Since uint64 cannot represent a negative value, the result here is implementation-dependent.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?Mac M1
What did you do?
What did you expect to see?
I would've expected
counter2 == 18446744071638365056
. It does work when running withGOARCH=amd64 go run .
The text was updated successfully, but these errors were encountered: