Skip to content

Commit 7a3a1e3

Browse files
authored
Merge pull request swiftlang#5500 from nkcsgexi/closure
2 parents 23525d9 + 9577d98 commit 7a3a1e3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

test/SourceKit/CodeExpand/code-expand.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,5 @@ func f1() {
7979
bar(a : {}}, <#T##d: () -> ()##() -> ()#>)
8080
}
8181
// CHECK: bar(a : {}}, <#T##d: () -> ()##() -> ()#>)
82+
83+
foo(withDuration: 1, animations: <#T##() -> Void#>)

tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1447,7 +1447,7 @@ class PlaceholderExpansionScanner {
14471447
bool containClosure(Expr *E) {
14481448
if (E->getStartLoc().isInvalid())
14491449
return false;
1450-
EditorPlaceholderExpr *Found;
1450+
EditorPlaceholderExpr *Found = nullptr;
14511451
ClosureInfo Info;
14521452
ClosureTypeWalker ClosureWalker(SM, Info);
14531453
PlaceholderFinder Finder(E->getStartLoc(), Found);

0 commit comments

Comments
 (0)