File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Sources/_SwiftSyntaxMacros/MacroProtocols
Tests/SwiftSyntaxMacrosTest Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ public protocol PeerMacro: AttachedMacro {
16
16
///
17
17
/// The macro expansion can introduce "peer" declarations that sit alongside
18
18
/// the given declaration.
19
- static func expansion(
19
+ static func expansion< Context : MacroExpansionContext > (
20
20
of node: AttributeSyntax ,
21
21
attachedTo declaration: DeclSyntax ,
22
- in context: any MacroExpansionContext
22
+ in context: Context
23
23
) throws -> [ DeclSyntax ]
24
24
}
25
25
Original file line number Diff line number Diff line change @@ -285,10 +285,10 @@ extension PropertyWrapper: AccessorMacro {
285
285
}
286
286
287
287
extension PropertyWrapper : PeerMacro {
288
- public static func expansion(
288
+ public static func expansion< Context : MacroExpansionContext > (
289
289
of node: AttributeSyntax ,
290
290
attachedTo declaration: DeclSyntax ,
291
- in context: any MacroExpansionContext
291
+ in context: Context
292
292
) throws -> [ SwiftSyntax . DeclSyntax ] {
293
293
guard let varDecl = declaration. as ( VariableDeclSyntax . self) ,
294
294
let binding = varDecl. bindings. first,
@@ -322,10 +322,10 @@ extension PropertyWrapper: PeerMacro {
322
322
}
323
323
324
324
public struct AddCompletionHandler : PeerMacro {
325
- public static func expansion(
325
+ public static func expansion< Context : MacroExpansionContext > (
326
326
of node: AttributeSyntax ,
327
327
attachedTo declaration: DeclSyntax ,
328
- in context: any MacroExpansionContext
328
+ in context: Context
329
329
) throws -> [ DeclSyntax ] {
330
330
// Only on functions at the moment. We could handle initializers as well
331
331
// with a bit of work.
You can’t perform that action at this time.
0 commit comments