@@ -137,7 +137,7 @@ private final class _ContextInserter<C, M>: SyntaxRewriter where C: MacroExpansi
137137 ///
138138 /// - Returns: A rewritten copy of `node` that calls into the expression
139139 /// context when it is evaluated at runtime.
140- private func _rewrite< E > ( _ node: E , originalWas originalNode: some SyntaxProtocol , calling functionName: TokenSyntax ? = nil , passing additionalArguments: [ Argument ] = [ ] ) -> ExprSyntax where E : ExprSyntaxProtocol {
140+ private func _rewrite( _ node: some ExprSyntaxProtocol , originalWas originalNode: some ExprSyntaxProtocol , calling functionName: TokenSyntax ? = nil , passing additionalArguments: [ Argument ] = [ ] ) -> ExprSyntax {
141141 guard rewrittenNodes. insert ( Syntax ( originalNode) ) . inserted else {
142142 // If this node has already been rewritten, we don't need to rewrite it
143143 // again. (Currently, this can only happen when expanding binary operators
@@ -196,7 +196,7 @@ private final class _ContextInserter<C, M>: SyntaxRewriter where C: MacroExpansi
196196 /// context when it is evaluated at runtime.
197197 ///
198198 /// This function is equivalent to `_rewrite(node, originalWas: node)`.
199- private func _rewrite< E > ( _ node: E , calling functionName: TokenSyntax ? = nil , passing additionalArguments: [ Argument ] = [ ] ) -> ExprSyntax where E : ExprSyntaxProtocol {
199+ private func _rewrite( _ node: some ExprSyntaxProtocol , calling functionName: TokenSyntax ? = nil , passing additionalArguments: [ Argument ] = [ ] ) -> ExprSyntax {
200200 _rewrite ( node, originalWas: node, calling: functionName, passing: additionalArguments)
201201 }
202202
@@ -423,7 +423,7 @@ private final class _ContextInserter<C, M>: SyntaxRewriter where C: MacroExpansi
423423 /// the original syntax tree.
424424 ///
425425 /// - Returns: A function call expression equivalent to the described cast.
426- private func _rewriteAsCast( _ valueExpr: ExprSyntax , _ isAsKeyword: Keyword , _ type: TypeSyntax , originalWas originalNode: some SyntaxProtocol ) -> ExprSyntax {
426+ private func _rewriteAsCast( _ valueExpr: ExprSyntax , _ isAsKeyword: Keyword , _ type: TypeSyntax , originalWas originalNode: some ExprSyntaxProtocol ) -> ExprSyntax {
427427 rewrittenNodes. insert ( Syntax ( type) )
428428
429429 return _rewrite (
0 commit comments