Skip to content

Commit 3ddd25b

Browse files
committed
[Macros] Fold the declaration node before expanding a peer macro.
1 parent 56a9e17 commit 3ddd25b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ASTGen/Sources/ASTGen/Macros.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,10 @@ func expandAttachedMacro(
437437
customAttrNode,
438438
foldingWith: OperatorTable.standardOperators
439439
),
440-
providingPeersOf: sourceManager.detach(declarationNode),
440+
providingPeersOf: sourceManager.detach(
441+
declarationNode,
442+
foldingWith: OperatorTable.standardOperators
443+
),
441444
in: context
442445
)
443446

0 commit comments

Comments
 (0)