Skip to content

[CodeCompletion] Annotated result type name #31637

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented May 7, 2020

Introduced 'TypeAnnotationBegin' chunk kind for grouping the result type name chunks.

rdar://problem/62617558

@rintaro
Copy link
Member Author

rintaro commented May 7, 2020

@swift-ci Please smoke test

@rintaro rintaro force-pushed the ide-completion-annotatedtypename-rdar62617558 branch from 2696d9a to 14b7890 Compare May 11, 2020 22:35
Introduced 'TypeAnnotationBegin' chunk kind for grouping the result type
name chunks.

rdar://problem/62617558
@rintaro rintaro force-pushed the ide-completion-annotatedtypename-rdar62617558 branch from 14b7890 to 7086ffb Compare May 12, 2020 05:57
@rintaro
Copy link
Member Author

rintaro commented May 12, 2020

@swift-ci Please test

@rintaro rintaro changed the title [WIP][CodeCompletion] Annotated result type name [CodeCompletion] Annotated result type name May 12, 2020
@rintaro rintaro marked this pull request as ready for review May 12, 2020 15:57
@rintaro rintaro requested review from benlangmuir and akyrtzi May 12, 2020 16:00
@@ -1236,6 +1236,7 @@ void SwiftLangSupport::codeCompleteOpen(
typeContextKind = completionCtx.typeContextKind;
mayUseImplicitMemberExpr = completionCtx.MayUseImplicitMemberExpr;
consumer.setReusingASTContext(completionCtx.ReusingASTContext);
consumer.setAnnotatedTypename(completionCtx.getAnnnoateResult());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo getAnnnoateResult

@@ -3990,7 +4074,7 @@ class CompletionLookup final : public swift::VisibleDeclConsumer {
builder.setLiteralKind(kind);

consumer(builder);
addTypeRelationFromProtocol(builder, kind, defaultTypeName);
addTypeRelationFromProtocol(builder, kind);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

defaultTypeName is now unused, so you can remove it from the lambda and the callsites. This applies to both the addFromProto lambdas in this patch.

@rintaro
Copy link
Member Author

rintaro commented May 12, 2020

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented May 12, 2020

@rintaro rintaro merged commit db8c500 into swiftlang:master May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants