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-10541] "Swift Programming Language" Book has mistaken formal definition of enumeration case associated values #52941

Closed
swift-ci opened this issue Apr 24, 2019 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself documentation

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-10541
Radar None
Original Reporter CTMacUser (JIRA User)
Type Bug
Status Closed
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Documentation
Assignee None
Priority Medium

md5: 1f3663782f31a4c741d2fefecae14839

Issue Description:

This is for the SPL for Swift 5. The formal reference section for enumeration declarations refers to tuple syntax for enumeration cases that have associated values. Said syntax allows zero-element payloads but not single-element ones, while (as I understand it) the reverse is actually true for associated values. (There's no problem in representing multiple-element payloads.)

There's more information in the following Swift forum thread: <https://forums.swift.org/t/correction-needed-for-swift-programming-language-book/23133\>.

@swift-ci
Copy link
Collaborator Author

Comment by Alex Martini (JIRA)

Thanks for calling out this issue! This being tracked as rdar://problem/49906528

@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. compiler The Swift compiler in itself documentation
Projects
None yet
Development

No branches or pull requests

1 participant