Skip to content

[CodeCompletion] Ignore implicit decl when finding equivalent decl #29377

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
merged 1 commit into from
Jan 23, 2020

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Jan 23, 2020

TypeChecker sometimes (e.g property wrappers) inserts implicit decls (e.g. PatternBindingDecls and VarDecls) between the decl in the AST. This used to confuse getEquivalentDeclContextFromSourceFile(). It canceled fast-completion, caused crashes, or completed in a wrong context.

Ignore implicit decls in the AST so that we can find the correct decl context.

rdar://problem/58665268

TypeChecker sometimes (e.g. property wrappers) inserts implicit decls
(e.g. 'PatternBindingDecl's and 'VarDecl's) between decls in the AST.
This used to confuse 'getEquivalentDeclContextFromSourceFile()'. It
canceled fast-completion, caused crashes, or completed in a wrong
context.

Ignore implicit decls in the AST so that we can find the correct decl
context.

rdar://problem/58665268
@rintaro rintaro force-pushed the ide-completion-rdar58665268 branch from ba77b2e to 7b4466f Compare January 23, 2020 06:30
@rintaro
Copy link
Member Author

rintaro commented Jan 23, 2020

@swift-ci Please smoke test

Copy link
Contributor

@nathawes nathawes left a comment

Choose a reason for hiding this comment

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

LGTM!

@rintaro rintaro merged commit 7d61f75 into swiftlang:master Jan 23, 2020
@rintaro rintaro deleted the ide-completion-rdar58665268 branch January 23, 2020 19:27
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.

2 participants