[SR-10541] "Swift Programming Language" Book has mistaken formal definition of enumeration case associated values #52941
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
documentation
Additional Detail from JIRA
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\>.
The text was updated successfully, but these errors were encountered: