Skip to content

Add convenience initializers that conforms to ExpressibleAsArrayExpr #483

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 4, 2022

Conversation

kimdv
Copy link
Contributor

@kimdv kimdv commented Jul 3, 2022

Part of #479

@kimdv kimdv marked this pull request as ready for review July 3, 2022 12:13
@kimdv kimdv requested a review from ahoppen as a code owner July 3, 2022 12:13
@kimdv
Copy link
Contributor Author

kimdv commented Jul 3, 2022

@swift-ci please test

@kimdv kimdv force-pushed the kimdv/add-convenience-initializers branch 2 times, most recently from f27779f to d58ae62 Compare July 7, 2022 06:43
@kimdv
Copy link
Contributor Author

kimdv commented Jul 7, 2022

@swift-ci please test

ahoppen
ahoppen previously approved these changes Jul 7, 2022
@ahoppen ahoppen dismissed their stale review July 7, 2022 08:14

Accidentally approved

@kimdv kimdv force-pushed the kimdv/add-convenience-initializers branch 2 times, most recently from a7eb28f to 97d1a59 Compare August 3, 2022 16:39
@kimdv kimdv force-pushed the kimdv/add-convenience-initializers branch from 97d1a59 to f93dd27 Compare August 3, 2022 16:41
@kimdv kimdv requested a review from ahoppen August 3, 2022 16:41
@kimdv
Copy link
Contributor Author

kimdv commented Aug 3, 2022

@swift-ci please test

@kimdv
Copy link
Contributor Author

kimdv commented Aug 4, 2022

@ahoppen, there was to much spacing so cleaned a bit too 🧹

@kimdv kimdv merged commit a7dbca2 into swiftlang:main Aug 4, 2022
Comment on lines -174 to -178
extension Array: ExpressibleAsArrayElementList where Element == ExpressibleAsArrayElement {
public func createArrayElementList() -> ArrayElementList {
return ArrayElementList(self)
}
}
Copy link
Member

@fwcd fwcd Aug 4, 2022

Choose a reason for hiding this comment

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

Hm, this removes the Array: ExpressibleAsArrayElementList conformance since ExpressibleAsArrayElementList now has a superprotocol (see #528 for details why generating Array conformances for these hierarchies is hard).

But I guess we can just use ArrayElementLists instead of ArrayExprs in those places now (or simply the builder-based initializer for ArrayExpr).

@kimdv kimdv deleted the kimdv/add-convenience-initializers branch December 14, 2022 14:26
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