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 @@ -575,6 +575,11 @@ bool TypeChecker::typeCheckForCodeCompletion(
575
575
if (!node)
576
576
return false ;
577
577
578
+ if (auto *expr = getAsExpr (node)) {
579
+ node = expr->walk (SanitizeExpr (Context,
580
+ /* shouldReusePrecheckedType=*/ false ));
581
+ }
582
+
578
583
CompletionContextFinder contextAnalyzer (node, DC);
579
584
580
585
// 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