[swift-evolution] Proposal: pattern match based on associated value(s) only
Amir Michail
amichail at gmail.com
Mon Feb 22 20:30:19 CST 2016
For example:
enum Color {
...
}
enum Vehicle {
case Car(Color)
case Motorcycle(Color)
...
}
switch vehicle {
case _(.Red): … // pattern match based on associated value only
}
More information about the swift-evolution
mailing list