Skip to content

[5.9][CodeSynthesis] Make sure that init synthesis expands macros #68100

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
Aug 25, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Aug 23, 2023

Cherry-pick of #67721


  • Explanation:

Previously both AreAllStoredPropertiesDefaultInitableRequest and HasMemberwiseInitRequest
checked only "current" properties of the type but macro expansions can add new stored and/or
init accessor properties that affect this logic so we need to make sure that macro expansions
happen and new properties are accounted for.

Note that the original idea was to use getStoredProperties() but that runs into multiple circularity
issues related to lazy properties.

Resolves: rdar://112153201

Previously both `AreAllStoredPropertiesDefaultInitableRequest`
and `HasMemberwiseInitRequest` checked only "current" properties
of the type but macro expansions can add new stored and/or
init accessor properties that affect this logic so we need to
make sure that macro expansions happen and new properties are
accounted for.

Note that the original idea was to use `getStoredProperties()`
but that runs into multiple circularity issues related to lazy
properties.

Resolves: rdar://112153201
(cherry picked from commit a0573e0)
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Aug 23, 2023
@xedin xedin requested a review from hborla August 23, 2023 19:35
@xedin xedin requested a review from a team as a code owner August 23, 2023 19:35
@xedin
Copy link
Contributor Author

xedin commented Aug 24, 2023

@swift-ci please test

@xedin xedin merged commit 4bc5904 into swiftlang:release/5.9 Aug 25, 2023
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