Skip to content

Builder based initializer for DictionaryExpr #455

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

Conversation

evnik
Copy link
Contributor

@evnik evnik commented Jun 4, 2022

Allow to use ArrayType and DictionaryType as PatternBinding.typeAnnotation argument

@evnik evnik requested a review from ahoppen as a code owner June 4, 2022 01:44
@evnik
Copy link
Contributor Author

evnik commented Jun 4, 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.

This looks good but I think there’s a slight mismatch between PR title, description in code. AFAICT

  • The description mentions “Allow to use ArrayType and DictionaryType as PatternBinding.typeAnnotation argument” covers all changes except DictionaryExprConvenienceInitializers.swift. These changes are looking great. ✅
  • The title “Builder based initializer for DictionaryExpr” covers the changes in DictionaryExprConvenienceInitializers.swift. It would be good to have test coverage for those before merging. Maybe we can just cherry-pick the test case from #454.

Allow to use `ArrayType` and `DictionaryType`
  as `PatternBinding.typeAnnotation` argument
@evnik evnik force-pushed the DictionaryExpr branch from bc6c9a0 to 7f9dcba Compare June 7, 2022 21:56
@evnik
Copy link
Contributor Author

evnik commented Jun 7, 2022

My intention was to avoid adding trailing commas, so I won't need to remove them in #454, but that's fine as well

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. Looks good 👍

I just prefer to keep the PRs isolated so we can’t forget to add the test case if for some reason we should decide to take a different direction on the other PR. It also makes for a nicer git history where you can see the test cases that were added for a particular code change.

@ahoppen
Copy link
Member

ahoppen commented Jun 8, 2022

@swift-ci Please test

@ahoppen ahoppen self-assigned this Jun 8, 2022
@ahoppen ahoppen merged commit 7bceeb0 into swiftlang:main Jun 8, 2022
@evnik evnik deleted the DictionaryExpr branch June 10, 2022 21:35
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