File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1318,7 +1318,7 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks {
1318
1318
if (!DC)
1319
1319
return ;
1320
1320
auto *CD = DC->getAsClassOrClassExtensionContext ();
1321
- if (CD == nullptr )
1321
+ if (!CD )
1322
1322
return ;
1323
1323
Type ST = CD->getSuperclass ();
1324
1324
if (ST.isNull () || ST->is <ErrorType>())
@@ -5318,6 +5318,13 @@ void CodeCompletionCallbacksImpl::doneParsing() {
5318
5318
if (isDynamicLookup (*ExprType))
5319
5319
Lookup.setIsDynamicLookup ();
5320
5320
5321
+ CodeCompletionResultBuilder Builder (CompletionContext.getResultSink (),
5322
+ CodeCompletionResult::ResultKind::Keyword,
5323
+ SemanticContextKind::CurrentNominal, {});
5324
+ Builder.setKeywordKind (CodeCompletionKeywordKind::kw_self);
5325
+ Builder.addTextChunk (" self" );
5326
+ Builder.addTypeAnnotation (ExprType->getString ());
5327
+
5321
5328
if (isa<BindOptionalExpr>(ParsedExpr) || isa<ForceValueExpr>(ParsedExpr))
5322
5329
Lookup.setIsUnwrappedOptional (true );
5323
5330
You can’t perform that action at this time.
0 commit comments