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

Add AnyError overloads for init(_:) and init(attempt:) #236

Merged
merged 1 commit into from
Jul 3, 2017

Conversation

ikesyo
Copy link
Member

@ikesyo ikesyo commented Jun 12, 2017

Similar to but slightly different from #233 (and smaller diff). I prefer to have separate signatures for each init overloads.

@ikesyo ikesyo added this to the 4.0 milestone Jun 14, 2017
@ikesyo ikesyo requested a review from mdiep June 14, 2017 10:52
self = .failure(AnyError(error))
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these overloads necessary?

The changes below compile without this change. I'm not sure what this adds.

(Type inference PRs are some of the hardest to review! 😅)

Copy link
Member Author

@ikesyo ikesyo Jun 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just added https://github.com/antitypical/Result/pull/236/files#diff-edf3d2a3570d3672e50cbe6ca3ede069R140 and without these overloads that does not compile! 😮

The test case / result are bit different from #233.

@ikesyo ikesyo force-pushed the init-anyerror-overloads branch 2 times, most recently from 9a1d9be to 65d2c2d Compare June 22, 2017 15:00
@mdiep mdiep merged commit de0512b into master Jul 3, 2017
@mdiep mdiep deleted the init-anyerror-overloads branch July 3, 2017 17:52
@ikesyo ikesyo mentioned this pull request Apr 26, 2018
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