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 file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So your proposal to narrow int64 -> rune would remove the top 32 bits, and produce a valid rune for numbers like 0x100000021.
Instead such large numbers are (and should be) automatically converted to "\uFFFD" by the conversion string(i)
3f0c7f8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conversion untyped integer -> untyped string is supported for any integer value - see https://go.dev/ref/spec#Conversions
So your proposal to narrow
int64
->rune
would remove the top 32 bits, and produce a valid rune for numbers like 0x100000021.Instead such large numbers are (and should be) automatically converted to "\uFFFD" by the conversion
string(i)