File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
validation-test/IDE/stress_tester_issues_fixed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -571,6 +571,11 @@ bool TypeChecker::typeCheckForCodeCompletion(
571
571
if (!node)
572
572
return false ;
573
573
574
+ if (auto *expr = getAsExpr (node)) {
575
+ node = expr->walk (SanitizeExpr (Context,
576
+ /* shouldReusePrecheckedType=*/ false ));
577
+ }
578
+
574
579
CompletionContextFinder contextAnalyzer (node, DC);
575
580
576
581
// If there was no completion expr (e.g. if the code completion location was
Original file line number Diff line number Diff line change
1
+ // RUN: %swift-ide-test -code-completion -source-filename %s -code-completion-token COMPLETE
2
+
3
+ func foo( closure: ( String ) -> Void ) -> String ? {
4
+ return nil
5
+ }
6
+
7
+ func test( ) {
8
+ if let key = foo ( closure: { str in str. suffix ( 2 ) == #^COMPLETE^#
You can’t perform that action at this time.
0 commit comments