Skip to content
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

Explicitly comparing optionals with nil due to swift changes in beta 5 #237

Merged
merged 1 commit into from
Aug 16, 2014
Merged

Conversation

iv-mexx
Copy link
Contributor

@iv-mexx iv-mexx commented Aug 16, 2014

From the release notes for Xcode 6 beta 5:

Optionals no longer conform to the BooleanType (formerly LogicValue) protocol, so they
may no longer be used in place of boolean expressions (they must be explicitly compared with
v != nil). This resolves confusion around Bool? and related types, makes code more
explicit about what test is expected, and is more consistent with the rest of the language.

The swift template has to be changed to explicitly check optional Errors for nil.

@iv-mexx iv-mexx changed the title Explicitly comparing optionals with nil due to language changes in beta 5 Explicitly comparing optionals with nil due to swift changes in beta 5 Aug 16, 2014
rentzsch added a commit that referenced this pull request Aug 16, 2014
[FIX] Explicitly comparing optionals with nil due to swift changes in beta 5. (Markus Chmelar)
@rentzsch rentzsch merged commit cad68ee into rentzsch:master Aug 16, 2014
@rentzsch
Copy link
Owner

Thanks!

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