Unless I'm mistaken, your stated goal (event[case: .bar]
) has the very same exact issue with cases that share names, @GLanza. And it does not even allow compound identifiers like .bar.name
.
I guess we have to live with the consequences of SE-0155 Normalize Enum Case Representation:
[...] shared base name will be allowed:
enum SyntaxTree { case type(variables: [TypeVariable]) case type(instantiated: [Type]) }
A solution could be that such enums can not be supported, or only partially supported. This is what a "Detailed Design" section of a proposal should have to describe precisely.