Skip to content

[CodeCompletion] Completion for @storageRestrictions attribute #68603

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

ahoppen
Copy link
Member

@ahoppen ahoppen commented Sep 19, 2023

Offer

  • storageRestrictions after @
  • initializes and accesses labels inside @storageRestrictions
  • Stored properties after the initializes and accesses labels

rdar://115501026

@ahoppen ahoppen requested a review from xedin September 19, 2023 00:15
@ahoppen ahoppen marked this pull request as ready for review September 19, 2023 00:15
@ahoppen
Copy link
Member Author

ahoppen commented Sep 19, 2023

@swift-ci Please smoke test

@ahoppen ahoppen force-pushed the ahoppen/storage-attribute-completion branch from 04209e3 to 2c41e11 Compare September 19, 2023 20:17
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

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

Thank you for adding this!

@ahoppen
Copy link
Member Author

ahoppen commented Sep 26, 2023

@swift-ci Please smoke test

@ahoppen ahoppen force-pushed the ahoppen/storage-attribute-completion branch from 2c41e11 to 39d450e Compare September 27, 2023 03:01
@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2023

@swift-ci Please smoke test

@ahoppen ahoppen force-pushed the ahoppen/storage-attribute-completion branch from 39d450e to 712d3e2 Compare September 27, 2023 03:52
@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2023

@swift-ci Please smoke test

@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2023

@hamishknight @xedin I added one more patch commit to this PR. Could you give it a quick review? 712d3e2

get { 1 }
}
// FIRST_ARGUMENT: Begin completions, 1 item
// FIRST_ARGUMENT-DAG: Decl[InstanceVar]/CurrNominal: other[#Int#];
Copy link
Contributor

Choose a reason for hiding this comment

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

Might make sense to add one more test here that checks "accesses:" as well for completeness.

Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

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

LGTM, looks like my comment about VD->hasStorage() is still outstanding, but I don't think it's that big of a deal

@ahoppen ahoppen force-pushed the ahoppen/storage-attribute-completion branch from 712d3e2 to 17e6a25 Compare September 27, 2023 16:38
…ge()` to determine if a variable is stored

This uncovered a discrepancy between `getImplInfo().hasStorage()` and `hasStorage()`.
@ahoppen
Copy link
Member Author

ahoppen commented Sep 27, 2023

@swift-ci Please smoke test

@ahoppen ahoppen merged commit 9050690 into swiftlang:main Oct 2, 2023
@ahoppen ahoppen deleted the ahoppen/storage-attribute-completion branch October 2, 2023 17:17
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