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.
2 parents b2cbece + 98a02af commit e2edfabCopy full SHA for e2edfab
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