Skip to content

SE-0439 trailing commas allowed in tuples but not tuple typesΒ #82542

Closed
@stephencelis

Description

@stephencelis

Description

Tuple type expressions seemed to have been left out, which is an unfortunate thing to have to special case when transforming Swift syntax for macros.

Reproduction

// βœ…
let t1 = (
  1,
  2,
  3,
)

let t2: (
  Int,
  Int,
  Int,
) = (  // πŸ›‘ Unexpected ',' separator
  1,
  2,
  3,
)

Expected behavior

I'd expect both to compile.

Environment

Apple Swift version 6.2-dev (LLVM 9ae4b59a6edd27c, Swift 9b6c04e)
Target: arm64-apple-macosx15.0
Build config: +assertions

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.triage neededThis issue needs more specific labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions