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
The expressions (Int.min..<Int.max).count and (Int.min...Int.max).count correctly trap because of an integer overflow. However, the same expressions with UInt, Int64, and UInt64 don't trap. The half-open range versions each return -1, whereas the closed-range versions return 0.
1> (UInt.min...UInt.max).count$R0: Int = 02> (Int64.min...Int64.max).count$R1: Int = 03> (UInt64.min...UInt64.max).count$R2: Int = 04> (Int.min...Int.max).countExecutioninterrupted. Entercodetorecoverandcontinue.
I think all of these should trap.
This is not a regression from Swift 4.1. I'm seeing the same behavior with Xcode 9.4 (Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)).
The text was updated successfully, but these errors were encountered: