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
IMO, this should not be expected. The error is a compile-time error from a function that is supposed to report at runtime whether there would be an overflow. Failing to compile this is akin to generating an error on the expression 1+1 == 2 just because its result is known to be true at compile-time.
Environment
MacBook 2.5ghz Intel Core I7, macOS 10.12.2, Xcode 8.2.1
Additional Detail from JIRA
md5: ed4206a13cf1c4db0bfb3f93be5acea8
relates to:
Issue Description:
The statement - Int.divideWithOverflow(Int.min, -1) - will give an overflow error.
Here is an extract of playground output when the statement is entered:
I checked on the Swift ML and was advised that this is expected. I am raising this issue as I feel that this "exception" needs to be documented.
The text was updated successfully, but these errors were encountered: