Proposal: switchValue

Example:

switch random() % 2 {
case 0:
            …
default: precondition(switchValue == 1)
             ...
}

I think you can accomplish this with "case let x: precondition(x == 1), or
am I missing something?

···

On Wed, Jan 13, 2016 at 7:39 AM Amir Michail via swift-evolution < swift-evolution@swift.org> wrote:

Example:

switch random() % 2 {
case 0:
            …
default: precondition(switchValue == 1)
             ...
}

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

--
Javier Soto