[SR-14258] Pattern-matching fails when enum case is type-qualified #56618
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
enum
Feature → type declarations: Swift enumeration declarations
pattern matching
Feature: pattern matching
swift 5.3
swift 5.9
type checker
Area → compiler: Semantic analysis
unexpected error
Bug: Unexpected error
Environment
Xcode Version 12.4 (12D4e)
macOS 10.15.7 (19H15)
Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)
Target: x86_64-apple-darwin19.6.0
Additional Detail from JIRA
md5: 44f7392d58ba8233dcd512e04b5c643a
Issue Description:
When referring to cases as ".foo" or ".bar", all is well. However, when using the type-qualified spelling "Demo.baz", the code fails to compile. Moreover, the diagnostic tells us that it... expects 'baz' to exist on String... but it knows its an enum case, soo... it must have seen the definition in 'Demo'? So why is it looking in String?
Weirdness.
The text was updated successfully, but these errors were encountered: