Created
November 24, 2016 01:17
-
-
Save toshi0383/c2083d9c37e37f3f6983635e7032bc2f to your computer and use it in GitHub Desktop.
UInt64 to Int conversion mistery #CodePiece
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
Int(UINT64_MAX) // error: integer overflows when converted from 'UInt64' to 'Int' | |
let a = UINT64_MAX | |
Int(a) // Compiles. Why? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment