Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-10659] Append key problem on Dictionary with enum on specific scenario #53058

Closed
swift-ci opened this issue May 10, 2019 · 2 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10659
Radar None
Original Reporter caiodias (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

macOS 10.14.4

Xcode 10.2.1

Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Bug
Assignee None
Priority Medium

md5: 723343bea276343c185ac808427785aa

duplicates:

  • SR-2176 Add warning for ambiguous enum value assignment

Issue Description:

No possible to append key with an enum value .none to dictionary.

Please check the attached a playground with the logic.

@swift-ci
Copy link
Collaborator Author

Comment by Caio Dias (JIRA)

If you rename the case none to anything else, it will work.

@belkadan
Copy link
Contributor

This is because Swift's Optional also has a case named none. There'll be a warning for this in Swift 5.1.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. standard library Area: Standard library umbrella
Projects
None yet
Development

No branches or pull requests

2 participants