Skip to content

[5.9][SILGenConstructor] InitAccessors: Make sure that accessed fields are initialized before init accessors #67586

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 2 commits into from
Jul 28, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jul 27, 2023

Cherry-pick of #67585

--

  • Explanation:

Initializations for all of the fields accessed by init accessor
should be emitted before init accessor property even if they are
declared after it in the source order, otherwise a call to init accessor
would reference uninitialized memory which is diagnosed by DI.

Resolves: rdar://112984795

xedin added 2 commits July 27, 2023 15:28
…into a method

This is a preliminary step in order to enable re-ordering of initializations
when init accessors are involved.

(cherry picked from commit 3bb81e3)
… initialized before init accessors

Initializations for all of the fields accessed by init accessor
should be emitted before init accessor property even if they are
declared after it in the source order.

Resolves: rdar://112984795
(cherry picked from commit f6017cc)
@xedin xedin requested a review from hborla July 27, 2023 22:31
@xedin xedin requested a review from a team as a code owner July 27, 2023 22:31
@xedin xedin added swift 5.9 🍒 release cherry pick Flag: Release branch cherry picks labels Jul 27, 2023
@xedin
Copy link
Contributor Author

xedin commented Jul 27, 2023

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jul 28, 2023

@swift-ci please test Windows platform

@xedin xedin merged commit 5aed2fc into swiftlang:release/5.9 Jul 28, 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