Skip to content

[CodeCompletion] '#file', '#line', et al. after '#' #24969

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 22, 2019

  • Implement completion for #file, #line, et al. after # in expression context
  • Polymorphic type annotation for #file, #line, et al. depending on context types
  • Suggest #selector and #keyPath only if the context type matches
  • Add CompletionLookup::CurrModule instance field to avoid recurring computation for CurrDeclContext->getParentModule()

rdar://problem/47169238

@rintaro rintaro requested a review from benlangmuir May 22, 2019 00:18
@rintaro
Copy link
Member Author

rintaro commented May 22, 2019

@swift-ci Please smoke test

@rintaro rintaro force-pushed the ide-completion-poundfile-rdar47169238 branch from ed8e1bb to c001483 Compare May 22, 2019 00:26
@rintaro
Copy link
Member Author

rintaro commented May 22, 2019

@swift-ci Please smoke test

Copy link
Contributor

@benlangmuir benlangmuir left a comment

Choose a reason for hiding this comment

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

Suggest #selector and #keyPath only if the context type matches

I see from the test changes that it wasn't working before, but to clarify: this was always what it was supposed to do, right?

Change looks great! Happy to see us getting the types right now.

@rintaro
Copy link
Member Author

rintaro commented May 22, 2019

this was always what it was supposed to do, right?

After # we used to unconditionally emit them.

@rintaro rintaro merged commit a79fadc into swiftlang:master May 22, 2019
@rintaro rintaro deleted the ide-completion-poundfile-rdar47169238 branch May 22, 2019 17:36
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