[SR-4891] Exhaustive switch statement on two optionals is flagged as non-exhaustive #47468
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Additional Detail from JIRA
md5: b57841df53f77b5adcf36e9e90e15f89
duplicates:
Issue Description:
This code, which ought to be legal, produces an error:
I believe the switch is actually exhaustive (the first two cases cover all possibilities where x or y have any non-nil value, and the last case covers the final nil, nil possibility) but the compiler isn't able to detect that.
The text was updated successfully, but these errors were encountered: