mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge remote-tracking branch 'origin/main' into rebranch
This commit is contained in:
@@ -3709,7 +3709,7 @@ static CallExpr *findTrailingClosureTarget(
|
||||
return nullptr;
|
||||
CallExpr *CE = cast<CallExpr>(contexts.back().get<Expr*>());
|
||||
|
||||
if (CE->hasTrailingClosure())
|
||||
if (CE->getUnlabeledTrailingClosureIndex().hasValue())
|
||||
// Call expression already has a trailing closure.
|
||||
return nullptr;
|
||||
|
||||
|
||||
9
test/refactoring/TrailingClosure/rdar81106400.swift
Normal file
9
test/refactoring/TrailingClosure/rdar81106400.swift
Normal file
@@ -0,0 +1,9 @@
|
||||
func lottaClosures(x: () -> Void, y: () -> Void, z: () -> Void) {
|
||||
lottaClosures(x: {}) {} z: {}
|
||||
}
|
||||
// RUN: not %refactor -trailingclosure -source-filename %s -pos=2:3
|
||||
|
||||
func singleClosure(x: () -> Void) {
|
||||
singleClosure {}
|
||||
}
|
||||
// RUN: not %refactor -trailingclosure -source-filename %s -pos=7:3
|
||||
@@ -120,7 +120,7 @@ git -C "%source_root%\swift" checkout-index --force --all
|
||||
@set "skip_repositories_arg=%skip_repositories_arg% --skip-repository tensorflow-swift-apis"
|
||||
@set "skip_repositories_arg=%skip_repositories_arg% --skip-repository yams"
|
||||
|
||||
call "%source_root%\swift\utils\update-checkout.cmd" %scheme_arg% %skip_repositories_arg% --clone --skip-history --github-comment "%ghprbCommentBody%" >NUL 2>NUL
|
||||
call "%source_root%\swift\utils\update-checkout.cmd" %scheme_arg% %skip_repositories_arg% --clone --skip-history --skip-tags --github-comment "%ghprbCommentBody%" >NUL 2>NUL
|
||||
|
||||
goto :eof
|
||||
endlocal
|
||||
|
||||
Reference in New Issue
Block a user