Skip to content

Convenience initializer for TupleExprElement #478

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
Jun 30, 2022

Conversation

evnik
Copy link
Contributor

@evnik evnik commented Jun 29, 2022

No description provided.

@evnik evnik requested a review from ahoppen as a code owner June 29, 2022 16:12
@ahoppen
Copy link
Member

ahoppen commented Jun 29, 2022

@swift-ci Please test

public extension TupleExprElement {
/// A convenience initializer that allows passing in label as an optional string.
/// The presence of the colon will be inferred based on the presence of the label.
init(_ label: String? = nil, expression: ExpressibleAsExprBuildable) {
Copy link
Member

Choose a reason for hiding this comment

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

I don’t have super strong opinions but I think I would prefer label to be a labelled argument instead of an unlabelled one. What was your reasoning for making it unlabeled?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just wanted to make the signature different to the existing one, but I'm fine to make it labelled

@evnik evnik force-pushed the TupleExprElement branch from fce7202 to dace338 Compare June 29, 2022 20:04
@kimdv
Copy link
Contributor

kimdv commented Jun 29, 2022

@swift-ci Please test

Copy link
Member

@ahoppen ahoppen left a comment

Choose a reason for hiding this comment

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

Thanks that you keep adding these little convenience utilities. 👍

@ahoppen ahoppen merged commit 6bde5f4 into swiftlang:main Jun 30, 2022
@evnik evnik deleted the TupleExprElement branch June 30, 2022 09:55
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