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(
571571 if (!node)
572572 return false ;
573573
574+ if (auto *expr = getAsExpr (node)) {
575+ node = expr->walk (SanitizeExpr (Context,
576+ /* shouldReusePrecheckedType=*/ false ));
577+ }
578+
574579 CompletionContextFinder contextAnalyzer (node, DC);
575580
576581 // 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