Skip to content

generic-where-clause for macro declaration should be optional. #466

Description

@JanWillemBrands

Location

https://docs.swift.org/swift-book/documentation/the-swift-programming-language/summaryofthegrammar/

Description

The Swift 6.3 grammar contains:

macro-declaration → macro-head identifier generic-parameter-clause? macro-signature macro-definition? generic-where-clause

The generic-where-clause should be optional, as evidenced by the SwiftSyntax model of MacroDecl:

Child(
  name: "genericWhereClause",
  kind: .node(kind: .genericWhereClause),
  ...
  isOptional: true
)

Correction

macro-declaration → macro-head identifier generic-parameter-clause? macro-signature macro-definition? generic-where-clause?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions