Skip to content

[5.9][TypeChecker/DI] InitAccessors: Treat properties without "initializes" as stored fix default initialization handling #68051

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

xedin
Copy link
Contributor

@xedin xedin commented Aug 21, 2023

Cherry-pick of #67763, #67769


  • Explanation:

A couple of improvements to init accessors feature to align implementation with the proposal.

Resolves: rdar://113401979
Resolves: rdar://113421273

xedin added 4 commits August 21, 2023 14:29
Adjust DI to treat init accessor properties that have only 'accesses'
or no restrictions as if they are stored properties, this means that
if such property doesn't have a default initializer users would have
to reference it explicitly in their custom initializers.

We also need to suppress default init synthesis for such cases which
would be done in a followup commit.

Resolves: rdar://113401979
(cherry picked from commit 11f1b08)
…r properties

Fixes a bug were default initializer for an init accessor property
hasn't been synthesized even when the property is marked as default
initializable.

Resolves: rdar://113421273
(cherry picked from commit 645e8df)
…tialization inside of an init accessor

(cherry picked from commit 2149a46)
…r properties during default init synthesis

Default initializable init properties shouldn't prevent default
init synthesis and such properties without anything to initialize
should be considered by it.

(cherry picked from commit 416bbae)
@xedin xedin added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Aug 21, 2023
@xedin xedin requested a review from hborla August 21, 2023 21:37
@xedin xedin requested a review from a team as a code owner August 21, 2023 21:37
@xedin
Copy link
Contributor Author

xedin commented Aug 21, 2023

@swift-ci please test

This aim to compensate the fact that not all of the changes
were cherry-picked to 5.9.
@xedin
Copy link
Contributor Author

xedin commented Aug 22, 2023

@swift-ci please test

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Aug 22, 2023

@swift-ci please test

@xedin xedin merged commit c9e8cd0 into swiftlang:release/5.9 Aug 23, 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