mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[CodeCompletion] Mark in keyword in closure signatures as CommonKeyword
rdar://138255761
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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]) {
|
||||
|
||||
Reference in New Issue
Block a user