File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1233,6 +1233,10 @@ void CompletionLookup::addFunctionCallPattern(
12331233 : CodeCompletionResultKind::Pattern,
12341234 SemanticContext ? *SemanticContext : getSemanticContextKind (AFD));
12351235 Builder.addFlair (CodeCompletionFlairBit::ArgumentLabels);
1236+ if (DotLoc) {
1237+ Builder.setNumBytesToErase (Ctx.SourceMgr .getByteDistance (
1238+ DotLoc, Ctx.SourceMgr .getIDEInspectionTargetLoc ()));
1239+ }
12361240 if (AFD)
12371241 Builder.setAssociatedDecl (AFD);
12381242
Original file line number Diff line number Diff line change 1+ // RUN: %batch-code-completion
2+
3+ struct Foo {
4+ func bar( argLabel: Int ) -> Int { 1 }
5+ }
6+ let x = Foo ( ) . bar
7+ x. #^AFTER_DOT^#
8+ // AFTER_DOT: Pattern/CurrModule/Flair[ArgLabels]/Erase[1]: ({#Int#})[#Int#]; name=()
9+
10+ x. #^AFTER_DOT_AND_SPACE^#
11+ // AFTER_DOT_AND_SPACE: Pattern/CurrModule/Flair[ArgLabels]/Erase[2]: ({#Int#})[#Int#]; name=()
12+
13+ x. #^AFTER_DOT_FOLLOWING_DOT? check= AFTER_DOT^#.
14+
15+ Foo( ) . bar. #^UNRESOLVED_MEMBER_REF^#
16+ // UNRESOLVED_MEMBER_REF: Decl[InstanceMethod]/CurrNominal/Flair[ArgLabels]/Erase[1]: ({#argLabel: Int#})[#Int#]; name=(argLabel:)
You can’t perform that action at this time.
0 commit comments