swift icon indicating copy to clipboard operation
swift copied to clipboard

Cannot resolve enum element pattern with sugared type qualifier

Open AnthonyLatsis opened this issue 8 months ago • 0 comments

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

AnthonyLatsis avatar Apr 08 '25 10:04 AnthonyLatsis