Skip to content

Commit d19a8b7

Browse files
committed
Expand tuple elements when in a (presumed) safe context
1 parent a4c0226 commit d19a8b7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Sources/TestingMacros/Support/ConditionArgumentParsing.swift

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,14 @@ private final class _ContextInserter<C, M>: SyntaxRewriter where C: MacroExpansi
261261
// tuple _types_ rather than _values_ (e.g. `(Int, Double)`) but those
262262
// cannot be distinguished with syntax alone.
263263
if _isParentOfDeclReferenceExprValidForRewriting(node) {
264-
return _rewrite(node)
264+
return _rewrite(
265+
TupleExprSyntax {
266+
for element in node.elements {
267+
visit(element).trimmed
268+
}
269+
},
270+
originalWas: node
271+
)
265272
}
266273

267274
return ExprSyntax(node)

0 commit comments

Comments
 (0)