[swift-evolution] Pitch: disallow `()` from Switch statement case satisfaction
Erica Sadun
erica at ericasadun.com
Tue Oct 11 13:43:47 CDT 2016
I thought this was long gone but today I found out it is still legal:
switch i {
case 4 ... 6: ()
case 3: print("Here")
default: break
}
Is there a motivating factor for keeping this in the language? The compiler picks up on Void and emits an error. You'd think () would produce the same results but it doesn't.
-- Erica
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161011/03686ab5/attachment.html>
More information about the swift-evolution
mailing list