We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
async
keyword(.async)
1 parent 7591cf8 commit 98a02afCopy full SHA for 98a02af
Examples/Sources/MacroExamples/Implementation/Peer/AddCompletionHandlerMacro.swift
@@ -33,9 +33,9 @@ public struct AddCompletionHandlerMacro: PeerMacro {
33
if funcDecl.signature.effectSpecifiers?.asyncSpecifier == nil {
34
let newEffects: FunctionEffectSpecifiersSyntax
35
if let existingEffects = funcDecl.signature.effectSpecifiers {
36
- newEffects = existingEffects.with(\.asyncSpecifier, "async ")
+ newEffects = existingEffects.with(\.asyncSpecifier, .keyword(.async))
37
} else {
38
- newEffects = FunctionEffectSpecifiersSyntax(asyncSpecifier: "async ")
+ newEffects = FunctionEffectSpecifiersSyntax(asyncSpecifier: .keyword(.async))
39
}
40
41
let newSignature = funcDecl.signature.with(\.effectSpecifiers, newEffects)
0 commit comments