Skip to content

[5.9][CodeComplete] Offer completion suggestions for default argument values inside the macro declaration + argument label inside #externalMacro #65638

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented May 4, 2023

  • Explanation: We were not type checking the default argument initializer because MacroDecl is not an AbstractFucntionDecl. Add MacroDecl to the list of nodes we know how to get parameters from.
    Pretty much unrelated, but also a small change in the same test file: Continue checking a #externalMacro declaration in code completion mode even if the argument labels don’t match. This way we get completion results for #externalMacro argument labels and when competing after # when externalMacro is already specified.
  • Scope: Code completion inside macros
  • Risk: Low
  • Testing: Added regression tests
  • Issues: rdar://108163564&108163809&108681394
  • Reviewer: @bnbarham and @xedin on [CodeComplete] Offer completion suggestions for default argument values inside the macro declaration + argument label inside #externalMacro #65526

ahoppen added 2 commits May 3, 2023 18:58
…es inside the macro declaration

We were not type checking the default argument initializer because `MacroDecl` is not an `AbstractFucntionDecl`. Add `MacroDecl` to the list of nodes we know how to get parameters from.

rdar://108163564
@ahoppen ahoppen requested a review from a team as a code owner May 4, 2023 02:00
@ahoppen ahoppen changed the title Ahoppen/5.9/complete in macro default arg [5.9][CodeComplete] Offer completion suggestions for default argument values inside the macro declaration + argument label inside #externalMacro May 4, 2023
@ahoppen ahoppen added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels May 4, 2023
@ahoppen
Copy link
Member Author

ahoppen commented May 4, 2023

@swift-ci Please test

@ahoppen ahoppen merged commit 251b719 into swiftlang:release/5.9 May 4, 2023
@ahoppen ahoppen deleted the ahoppen/5.9/complete-in-macro-default-arg branch May 4, 2023 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants