mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
We treated enum case parameters the same way as function parameters and weren’t considering that they can be unlabeled. That caused us to insert eg. `_ ` in front of the case’s type, producing `case myCase(_ String)`, which is invalid. When we are inside an enum case parameter and the parameter label is empty, treat it the same as a function call, which will leave the label untouched if it isn’t modified and insert a label including a colon if a new label is introduced. https://github.com/apple/sourcekit-lsp/issues/1228