[swift-users] Where to report this bug?
alblue at apple.com
Fri Sep 22 03:19:29 CDT 2017
Int.min is the smallest negative value, and Int.max is the largest positive value (that fits in an Int). However, the absolute value of Int.min is larger than the absolute value of Int.max. So you can't convert Int.min into -Int.min because it's larger than Int.max.
In other words, this is expected behaviour :)
Int.min + Int.max = 1
If they were the same value, it would be zero.
> On 22 Sep 2017, at 02:42, Peter W A Wood via swift-users <swift-users at swift.org> wrote:
> Entering the following statement in a playground gives an overflow error. Where should I report this?
> Playground log:
> Playground execution failed:
> error: MyPlayground.playground:3:9: error: division '-9223372036854775808 / -1' results in an overflow
> swift-users mailing list
> swift-users at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-users