Skip to content

Commit 60791cd

Browse files
authored
Merge pull request #2380 from SimplyDanny/braced-precedence-decl-group
Let `PrecedenceGroupDeclSyntax` conform to `BracedSyntax`
2 parents 046a603 + 8abecc4 commit 60791cd

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1746,6 +1746,7 @@ public let DECL_NODES: [Node] = [
17461746
nameForDiagnostics: "precedencegroup",
17471747
documentation: "A Swift `precedencegroup` declaration.",
17481748
traits: [
1749+
"Braced",
17491750
"NamedDecl",
17501751
"WithAttributes",
17511752
"WithModifiers",

CodeGeneration/Tests/ValidateSyntaxNodes/ValidateSyntaxNodes.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,6 @@ class ValidateSyntaxNodes: XCTestCase {
507507
ValidationFailure(node: .editorPlaceholderExpr, message: "could conform to trait 'MissingNode' but does not"),
508508
ValidationFailure(node: .enumCaseElement, message: "could conform to trait 'NamedDecl' but does not"),
509509
ValidationFailure(node: .genericParameter, message: "could conform to trait 'NamedDecl' but does not"),
510-
ValidationFailure(node: .precedenceGroupDecl, message: "could conform to trait 'Braced' but does not"),
511510
ValidationFailure(node: .precedenceGroupName, message: "could conform to trait 'NamedDecl' but does not"),
512511
ValidationFailure(node: .primaryAssociatedType, message: "could conform to trait 'NamedDecl' but does not"),
513512
ValidationFailure(node: .yieldedExpressionsClause, message: "could conform to trait 'Parenthesized' but does not"),

Sources/SwiftSyntax/generated/SyntaxTraits.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ extension PlatformVersionItemSyntax: WithTrailingCommaSyntax {}
801801

802802
extension PoundSourceLocationSyntax: ParenthesizedSyntax {}
803803

804-
extension PrecedenceGroupDeclSyntax: NamedDeclSyntax, WithAttributesSyntax, WithModifiersSyntax {}
804+
extension PrecedenceGroupDeclSyntax: BracedSyntax, NamedDeclSyntax, WithAttributesSyntax, WithModifiersSyntax {}
805805

806806
extension PrecedenceGroupNameSyntax: WithTrailingCommaSyntax {}
807807

0 commit comments

Comments
 (0)