Skip to content

Use precondition instead of fatalError in DateInterval initializer #1292

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
Nov 2, 2017
Merged

Conversation

ogres
Copy link
Contributor

@ogres ogres commented Nov 2, 2017

Comment of the function says:

/// - precondition: end >= start

but it actually uses if -> fatalError instead of precondition,

Other functions of DateInterval use precondition-s, only this one uses 'fatalError', probably makes sense to change it as well.

@spevans
Copy link
Contributor

spevans commented Nov 2, 2017

@swift-ci please test

@alblue
Copy link
Contributor

alblue commented Nov 2, 2017

LGTM

@swift-ci please test and merge

@swift-ci swift-ci merged commit 2ec3015 into swiftlang:master Nov 2, 2017
@parkera
Copy link
Contributor

parkera commented Nov 2, 2017

This is shared with overlay code; we should attempt to keep them in sync.

@ogres
Copy link
Contributor Author

ogres commented Nov 2, 2017

@parkera
Copy link
Contributor

parkera commented Nov 3, 2017

Yup, that would be great.

@ogres
Copy link
Contributor Author

ogres commented Nov 3, 2017

@parkera here you are swiftlang/swift#12743

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.

5 participants