Skip to content

[stdlib] Fix print method syntax and add the optional binding #2460

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 3 commits into from
May 11, 2016
Merged

[stdlib] Fix print method syntax and add the optional binding #2460

merged 3 commits into from
May 11, 2016

Conversation

dakeshi
Copy link
Contributor

@dakeshi dakeshi commented May 10, 2016

What's in this pull request?

  • Fix print(:separator =) with print(:separator:terminator) syntax.
  • First, last property of an array returns an optional type. So it needs to unwrap process.
    Add the optional binding for accessing optional first, last property

Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

  • Add optional binding for using optional first, last property

* Add optional binding for using optional first, last property
@dakeshi dakeshi changed the title [stdlib] Fix print method syntax and add optional binding [stdlib] Fix print method syntax and add the optional binding May 10, 2016
@lattner
Copy link
Contributor

lattner commented May 10, 2016

LGTM, please don't change trailing whitespace on unrelated lines though, thanks!

@moiseev
Copy link
Contributor

moiseev commented May 10, 2016

FWIW, terminator argument has a default value, which is exactly the \n.

* Remove terminator argument in print method because the default terminator is "\n".
* Revert removed trailing whitespace by the previous commit
@dakeshi
Copy link
Contributor Author

dakeshi commented May 11, 2016

Thank you for your feedback @lattner, @moiseev
I fixed it: b49b5c4

@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@lattner lattner merged commit 4cf5613 into swiftlang:master May 11, 2016
@lattner
Copy link
Contributor

lattner commented May 11, 2016

Thanks!

@dakeshi dakeshi deleted the stdlib-core-array-structure branch May 11, 2016 03: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.

4 participants