Skip to content

Commit

Permalink
Switch to throwsClause API for macro example
Browse files Browse the repository at this point in the history
  • Loading branch information
DougGregor committed Dec 1, 2023
1 parent 3fe6997 commit d0a35c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public struct AddAsyncMacro: PeerMacro {
funcDecl.signature.effectSpecifiers = FunctionEffectSpecifiersSyntax(
leadingTrivia: .space,
asyncSpecifier: .keyword(.async),
throwsSpecifier: isResultReturn ? .keyword(.throws) : nil
throwsClause: isResultReturn ? ThrowsClauseSyntax(throwsSpecifier: .keyword(.throws)) : nil
)

// add result type
Expand Down

0 comments on commit d0a35c5

Please sign in to comment.