[swift-evolution] [Pitch] Guarding on enum values

Brent Royal-Gordon brent at architechies.com
Wed Dec 23 17:34:47 CST 2015


> What about an enumeration with three cases? 
> 
> For example:
> 
> enum Result {
> case Success
> case Failure
> case Cancelled
> }

What about it? The case permitted by the `guard` continues through the surrounding scope; the other cases are handled by the `else` block.

-- 
Brent Royal-Gordon
Architechies



More information about the swift-evolution mailing list