swift
swift copied to clipboard
Sema: Recognize non-identifier type qualifiers in enum element patterns and type expressions
Recognize non-identifier type qualifiers
-
when resolving an enum element pattern. For example, the following
switchstatements were not considered exhaustive because the parsed expressions resolved to expression patterns:enum E { case a } let e: E switch e { case [E].Element.a: break }switch Int?.none { case Int?.none: break case Int?.some(_): break } -
in type expressions. Note that simple type expressions, like
[X].Element.a, already compiled fine at the time I started working on the associated issue, but were given a suboptimal representation.
Resolves https://github.com/swiftlang/swift/issues/80632
@swift-ci please smoke test macOS
@xedin ping