This might be an interesting use case for a macro, which could generate a nested Cases
enum with one case
for each case in the outer enum but without the payloads, along with a computed property that maps the payload cases in the outer enums to the corresponding no-payload cases in the inner enum.
7 Likes