Skip to content

Nate/continue default initialization #193

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 7 commits into from
Jun 23, 2020

Conversation

natecook1000
Copy link
Member

Description

This integrates the changes in #170 and #186, moving array default values to the normal syntax.

Detailed Design

This kind of declaration is now permitted:

struct Example: ParsableCommand {
    @Argument(help: "Your lottery numbers")
    var lotto: [Int] = [4, 8, 15, 16, 23, 42]
}

Documentation Plan

Updated symbol documentation and guides.

Test Plan

Unit tests

Source Impact

The new defaults in #170 haven't been included in a release yet, so there's no source breakage. Declarations of array options or arguments will have a deprecation warning indicating that users should specify an empty array literal as the property default.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

@natecook1000
Copy link
Member Author

@swift-ci Please test

@natecook1000 natecook1000 merged commit 35ceb59 into master Jun 23, 2020
@natecook1000 natecook1000 deleted the nate/continue_default_initialization branch June 23, 2020 15:43
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.

1 participant