[SR-13608] Swift 5.5 and 5.3 compilers confuse enum case names with struct name #56043
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
type checker
Area → compiler: Semantic analysis
Environment
macOS 10.15.16
Xcode 12.0 GM (12A7209)
And Xcode 12.2 beta (12B5018i)
~ % xcode-select -p
/Applications/Xcode.app/Contents/Developer
~ % swift --version
Apple Swift version 5.3 (swiftlang-1200.0.29.2 clang-1200.0.30.1)
Target: x86_64-apple-darwin19.6.0
and
~ % xcode-select -p
/Applications/Xcode-beta.app/Contents/Developer
~ % swift --version
Apple Swift version 5.3.1 (swiftlang-1200.0.35 clang-1200.0.32.4)
Target: x86_64-apple-darwin19.6.0
Additional Detail from JIRA
md5: bb11ef562b5bc556ff9f9532474e9b69
Issue Description:
If you have a struct with the same name as the enum value in an enum and then have a computed property in the enum that references that struct then the compiler erroneously thinks the struct name is an enum case even though it doesn't have a . in front of it.
The text was updated successfully, but these errors were encountered: