Skip to content

Commit 4652ad2

Browse files
authored
Merge pull request #2119 from natikgadzhi/natikgadzhi/syntax-rewriter-refactor-cast
Remove unnecessary casts in SyntaxRewriter
2 parents 43b7a9f + 6bfac1e commit 4652ad2

File tree

2 files changed

+158
-158
lines changed

2 files changed

+158
-158
lines changed

CodeGeneration/Sources/generate-swift-syntax/templates/swiftsyntax/SyntaxRewriterFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ let syntaxRewriterFile = SourceFileSyntax(leadingTrivia: copyrightHeader) {
127127
/// - Returns: the rewritten node
128128
\(node.apiAttributes())\
129129
open func visit(_ node: \(node.kind.syntaxType)) -> \(node.kind.syntaxType) {
130-
return Syntax(visitChildren(node)).cast(\(node.kind.syntaxType).self)
130+
return visitChildren(node)
131131
}
132132
"""
133133
)

0 commit comments

Comments
 (0)