When switching on an enumeration, if you write the switch without putting any cases, Xcode will complain that the "Switch must be exhaustive". If you click the error, it gives you the option of fixing it, and in doing so autocompleting the cases for you.
However, this doesn't work when switching on a tuple of enumerations. The same error will be displayed, but when clicking fix it
, this is what will result:
enum Color {
case red, blue
}
enum Number {
case one, two
}
let tuple=(Color.red, Number.one)
switch tuple {
case (_, _):
}
What I'm proposing is that when clicking fix it
for tuple enumerations this results:
switch tuple {
case (.red, .one):
case (.red, .two):
case (.blue, .one):
case (.blue, .two):
}