[swift-users] for i in 0...UInt8.max
tuuranton at tutanota.de
tuuranton at tutanota.de
Wed Jan 11 07:06:00 CST 2017
I'm looking at Swift 3.0.1 now. This code works fine:
for i in 0..<UInt8.max { print(i)}
And so does this code:
for i in 0...UInt8.max { print(i)}
These codes used to crash in earlier Swifts. Can you explain why? What changed in the meantime? It had something to do with the range overflow at UInt8.max.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170111/68ba27ec/attachment.html>
More information about the swift-users
mailing list