Skip to content

Commit 32a0b2e

Browse files
committed
[CodeCompletion] Exclude precedence groups from type completion
1 parent 9ba232d commit 32a0b2e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5695,7 +5695,6 @@ void swift::ide::copyCodeCompletionResults(CodeCompletionResultSink &targetSink,
56955695
if (R->getKind() != CodeCompletionResult::Declaration)
56965696
return false;
56975697
switch(R->getAssociatedDeclKind()) {
5698-
case CodeCompletionDeclKind::PrecedenceGroup:
56995698
case CodeCompletionDeclKind::Module:
57005699
case CodeCompletionDeclKind::Class:
57015700
case CodeCompletionDeclKind::Struct:
@@ -5705,6 +5704,7 @@ void swift::ide::copyCodeCompletionResults(CodeCompletionResultSink &targetSink,
57055704
case CodeCompletionDeclKind::AssociatedType:
57065705
case CodeCompletionDeclKind::GenericTypeParam:
57075706
return true;
5707+
case CodeCompletionDeclKind::PrecedenceGroup:
57085708
case CodeCompletionDeclKind::EnumElement:
57095709
case CodeCompletionDeclKind::Constructor:
57105710
case CodeCompletionDeclKind::Destructor:

test/IDE/complete_decl_attribute.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ struct _S {
149149
// ON_PROPERTY-DAG: Keyword/None: GKInspectable[#Var Attribute#]; name=GKInspectable
150150
// ON_PROPERTY-NOT: Keyword
151151
// ON_PROPERTY: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct
152+
// ON_PROPERTY-NOT: Decl[PrecedenceGroup]
152153
// ON_PROPERTY: End completions
153154

154155
@#^ON_METHOD^#
@@ -192,6 +193,7 @@ struct _S {
192193
// ON_MEMBER_LAST-DAG: Keyword/None: _propertyWrapper[#Declaration Attribute#]; name=_propertyWrapper
193194
// ON_MEMBER_LAST-NOT: Keyword
194195
// ON_MEMBER_LAST: Decl[Struct]/CurrModule: MyStruct[#MyStruct#]; name=MyStruct
196+
// ON_MEMBER_LAST-NOT: Decl[PrecedenceGroup]
195197
// ON_MEMBER_LAST: End completions
196198
}
197199

0 commit comments

Comments
 (0)