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 more methods to Result to make it more easy to use with Throwables. #288

Merged
merged 6 commits into from
Nov 7, 2021

Conversation

JarvisCraft
Copy link
Owner

Description

This adds type-inference support to Result#try*(..) family of methods using @TypeHints.

This also adds conditional mapping methods to Extensions.

Bugs

This fixes an accidental bug where non-type-inferred Result#tryGet used Exception instead of Throwable.

Notes

Conditional mappers cannot be implemented as virtual methods because they require upcasting.

@JarvisCraft JarvisCraft added bug Something isn't working enhancement New feature or request labels Nov 7, 2021
@JarvisCraft JarvisCraft added this to the 1.0.0 milestone Nov 7, 2021
@JarvisCraft JarvisCraft self-assigned this Nov 7, 2021
@JarvisCraft JarvisCraft changed the base branch from master to development November 7, 2021 12:07
@JarvisCraft JarvisCraft merged commit 655a713 into development Nov 7, 2021
@JarvisCraft JarvisCraft deleted the result-throwable-friendship branch November 7, 2021 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant