Skip to content

Commit d6e4b70

Browse files
committed
[Macros] Update member attribute macro test cases to account for a change in
the MemberAttributeMacro protocol in SwiftSyntax.
1 parent bebd0d0 commit d6e4b70

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

test/Macros/Inputs/syntax_macro_definitions.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ public struct WrapAllProperties: MemberAttributeMacro {
299299
public static func expansion(
300300
of node: AttributeSyntax,
301301
attachedTo parent: some DeclGroupSyntax,
302-
providingAttributesFor member: DeclSyntax,
302+
providingAttributesFor member: some DeclSyntaxProtocol,
303303
in context: some MacroExpansionContext
304304
) throws -> [AttributeSyntax] {
305305
guard member.is(VariableDeclSyntax.self) else {
@@ -329,7 +329,7 @@ extension TypeWrapperMacro: MemberAttributeMacro {
329329
public static func expansion(
330330
of node: AttributeSyntax,
331331
attachedTo decl: some DeclGroupSyntax,
332-
providingAttributesFor member: DeclSyntax,
332+
providingAttributesFor member: some DeclSyntaxProtocol,
333333
in context: some MacroExpansionContext
334334
) throws -> [AttributeSyntax] {
335335
guard let varDecl = member.as(VariableDeclSyntax.self),
@@ -451,7 +451,7 @@ public struct WrapStoredPropertiesMacro: MemberAttributeMacro {
451451
>(
452452
of node: AttributeSyntax,
453453
attachedTo decl: Declaration,
454-
providingAttributesFor member: DeclSyntax,
454+
providingAttributesFor member: some DeclSyntaxProtocol,
455455
in context: Context
456456
) throws -> [AttributeSyntax] {
457457
guard let property = member.as(VariableDeclSyntax.self),
@@ -660,7 +660,7 @@ public struct ObservableMacro: MemberMacro, MemberAttributeMacro {
660660
public static func expansion(
661661
of node: AttributeSyntax,
662662
attachedTo declaration: some DeclGroupSyntax,
663-
providingAttributesFor member: DeclSyntax,
663+
providingAttributesFor member: some DeclSyntaxProtocol,
664664
in context: some MacroExpansionContext
665665
) throws -> [SwiftSyntax.AttributeSyntax] {
666666
guard member.isObservableStoredProperty else {

test/Serialization/Inputs/def_macro_plugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public struct WrapAllProperties: MemberAttributeMacro {
2929
public static func expansion(
3030
of node: AttributeSyntax,
3131
attachedTo parent: some DeclGroupSyntax,
32-
providingAttributesFor member: DeclSyntax,
32+
providingAttributesFor member: some DeclSyntaxProtocol,
3333
in context: some MacroExpansionContext
3434
) throws -> [AttributeSyntax] {
3535
return []

0 commit comments

Comments
 (0)