File tree 3 files changed +4
-4
lines changed 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -511,9 +511,9 @@ fileprivate final class TokenStreamCreator: SyntaxVisitor {
511
511
/// Arranges the `async` and `throws` effect specifiers of a function or accessor declaration.
512
512
private func arrangeEffectSpecifiers< Node: EffectSpecifiersSyntax > ( _ node: Node ) {
513
513
before ( node. asyncSpecifier, tokens: . break)
514
- before ( node. throwsSpecifier, tokens: . break)
514
+ before ( node. throwsClause ? . throwsSpecifier, tokens: . break)
515
515
// Keep them together if both `async` and `throws` are present.
516
- if let asyncSpecifier = node. asyncSpecifier, let throwsSpecifier = node. throwsSpecifier {
516
+ if let asyncSpecifier = node. asyncSpecifier, let throwsSpecifier = node. throwsClause ? . throwsSpecifier {
517
517
before ( asyncSpecifier, tokens: . open)
518
518
after ( throwsSpecifier, tokens: . close)
519
519
}
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ public final class UseSynthesizedInitializer: SyntaxLintRule {
36
36
// Collect any possible redundant initializers into a list
37
37
} else if let initDecl = member. as ( InitializerDeclSyntax . self) {
38
38
guard initDecl. optionalMark == nil else { continue }
39
- guard initDecl. signature. effectSpecifiers? . throwsSpecifier == nil else { continue }
39
+ guard initDecl. signature. effectSpecifiers? . throwsClause ? . throwsSpecifier == nil else { continue }
40
40
initializers. append ( initDecl)
41
41
}
42
42
}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ public final class ValidateDocumentationComments: SyntaxLintRule {
62
62
}
63
63
64
64
validateThrows (
65
- signature. effectSpecifiers? . throwsSpecifier,
65
+ signature. effectSpecifiers? . throwsClause ? . throwsSpecifier,
66
66
name: name,
67
67
throwsDescription: docComment. throws,
68
68
node: node)
You can’t perform that action at this time.
0 commit comments