Skip to content

[Sema/SILGen] InitAccessors: Synthesize default arguments for init accessor properties #66681

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 4 commits into from
Jun 16, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 15, 2023

  • Allow initialization expressions when computed property has init accessor;
  • Synthesize default argument for init accessor property included in memberwise initializer.

xedin added 4 commits June 15, 2023 11:38
…ed properties that have `init` accessor

Initialization expressions are not allowed on computed properties
but if a property has `init` accessor it should be allowed because
it could be used by a memberwise initializer.
Previously only stored properties could be initializable but with
introduction of init accessors computed properties gained an ability
to specify initialzer expression and participation in memberwise
initialization for structs.
@xedin
Copy link
Contributor Author

xedin commented Jun 15, 2023

swiftlang/swift-syntax#1795
@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jun 15, 2023

swiftlang/swift-syntax#1795
@swift-ci please test Windows platform

@ahoppen ahoppen removed their request for review June 16, 2023 10:47
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.

2 participants