Skip to content

Commit d0a35c5

Browse files
committed
Switch to throwsClause API for macro example
1 parent 3fe6997 commit d0a35c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Examples/Sources/MacroExamples/Implementation/Peer/AddAsyncMacro.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public struct AddAsyncMacro: PeerMacro {
127127
funcDecl.signature.effectSpecifiers = FunctionEffectSpecifiersSyntax(
128128
leadingTrivia: .space,
129129
asyncSpecifier: .keyword(.async),
130-
throwsSpecifier: isResultReturn ? .keyword(.throws) : nil
130+
throwsClause: isResultReturn ? ThrowsClauseSyntax(throwsSpecifier: .keyword(.throws)) : nil
131131
)
132132

133133
// add result type

0 commit comments

Comments
 (0)