mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In Swift 3 shifts used to be defined on the concrete integer types, so the right-hand-side value in the shift expression could define a type for the result, as in `1 << i32` would have the type Int32. Swift 4 makes shift operators heterogeneous, so now `1 << i32` will result in an Int, according to the type of the left-hand-side value, which gets a default type for integer literals.
1.9 KiB
1.9 KiB