[CodeCompletion] Mark in keyword in closure signatures as CommonKeyword

rdar://138255761
This commit is contained in:
Alex Hoppen
2024-10-30 17:07:10 -07:00
parent b7f551ffb5
commit 73bb2a516e
3 changed files with 5 additions and 3 deletions

View File

@@ -960,7 +960,9 @@ addClosureSignatureKeywordsIfApplicable(CodeCompletionResultSink &Sink,
if (closure->getInLoc().isValid())
return;
addKeyword(Sink, "in", CodeCompletionKeywordKind::kw_in);
addKeyword(Sink, "in", CodeCompletionKeywordKind::kw_in,
/*TypeAnnotation=*/"",
CodeCompletionFlairBit::CommonKeywordAtCurrentPosition);
}
void CodeCompletionCallbacksImpl::addKeywords(CodeCompletionResultSink &Sink,

View File

@@ -3,7 +3,7 @@
// KW_RETURN: Keyword[return]/None: return{{; name=.+$}}
// KW_NO_RETURN-NOT: Keyword[return]
// KW_IN: Keyword[in]/None: in{{; name=.+$}}
// KW_IN: Keyword[in]/None/Flair[CommonKeyword]: in{{; name=.+$}}
// KW_NO_IN-NOT: Keyword[in]
// KW_NO_INOUT-NOT: Keyword[inout]

View File

@@ -1,6 +1,6 @@
// RUN: %batch-code-completion
// KW_IN: Keyword[in]/None: in{{; name=.+$}}
// KW_IN: Keyword[in]/None/Flair[CommonKeyword]: in{{; name=.+$}}
// KW_NO_IN-NOT: Keyword[in]
func test(value: [Int]) {