swift
swift copied to clipboard
Cannot resolve enum element pattern with sugared type qualifier
Description
Below, neither of the switches are considered exhaustive because the patterns are evaluated as expressions rather than enum elements.
Reproduction
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
}
Expected behavior
Successful compilation.
Environment
Swift version 6.2-dev (LLVM 3374ec7e774383d, Swift c5e5311cc8ea7db)
Additional information
No response