Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/SwiftRefactor/CallToTrailingClosures.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ extension FunctionCallExprSyntax {
)
}

var converted = self.detach()
var converted = self.detached

// Remove parens if there's no non-closure arguments left and remove the
// last comma otherwise. Makes sure to keep the trivia of any removed node.
Expand Down
8 changes: 4 additions & 4 deletions Sources/SwiftRefactor/ExpandEditorPlaceholder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ extension FunctionTypeSyntax {
/// ```
fileprivate var closureExpansion: ClosureExprSyntax {
let closureSignature: ClosureSignatureSyntax?
if !arguments.isEmpty {
if !parameters.isEmpty {
let args = ClosureParamListSyntax {
for arg in arguments {
for arg in parameters {
ClosureParamSyntax(name: arg.expansionNameToken())
}
}
Expand Down Expand Up @@ -261,13 +261,13 @@ extension FunctionCallExprSyntax {
var parser = Parser(edit.replacement)
let expr = ExprSyntax.parse(from: &parser)
expandedArgs.append(
arg.detach().with(\.expression, expr)
arg.detached.with(\.expression, expr)
)
}

let originalArgs = argumentList.dropLast(argsToExpand)
return (
detach().with(\.argumentList, TupleExprElementListSyntax(originalArgs + expandedArgs)),
detached.with(\.argumentList, TupleExprElementListSyntax(originalArgs + expandedArgs)),
expandedArgs.count
)
}
Expand Down