Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Get rid of optionalFrom #83

Closed
plivesey opened this issue Oct 21, 2016 · 4 comments
Closed

Get rid of optionalFrom #83

plivesey opened this issue Oct 21, 2016 · 4 comments

Comments

@plivesey
Copy link

Working on another project, and I think this has been fixed in Swift 3 (however, it doesn't seem to work in playgrounds...only real projects).

As in, the compiler is smart enough to pick the right function based on return type now.

@sberrevoets
Copy link

I just tried this and it looks like this indeed has been fixed, nice catch 👍

@keith
Copy link
Contributor

keith commented Oct 22, 2016

I can't test this right now but I think in order to get rid of this, this would need to work without parens:

foo = try? map.from("bar") ?? "default"

@keith
Copy link
Contributor

keith commented Nov 4, 2016

it looks like this order of operations still doesn't apply how we'd like it to (as of Xcode 8.1)

@keith
Copy link
Contributor

keith commented Feb 12, 2017

Closing this one. But if we ever notice the operator precedence changing to solve this I'll definitely remove optionalFrom

@keith keith closed this as completed Feb 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants