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

Prelude.OptionalAsync Throws ValueIsNoneException For Null #1159

Closed
pjwilliams2 opened this issue Dec 20, 2022 · 2 comments
Closed

Prelude.OptionalAsync Throws ValueIsNoneException For Null #1159

pjwilliams2 opened this issue Dec 20, 2022 · 2 comments

Comments

@pjwilliams2
Copy link

#799 seems to have cropped back up. Also, awaiting the OptionalAsync results in an unwrapped value instead of an Option.

LanguageExt version 4.4.0
Dotnet 7.0.0

Sample:

image

@johnetc
Copy link

johnetc commented Jan 31, 2023

Yep, similarly it means Task.Delay no longer functions with OptionAsync<> without throwing an exception

louthy added a commit that referenced this issue Feb 5, 2023
* Fix for Using Task.Delay with OptionAsync

#1184

* Fix for Prelude.OptionalAsync Throws ValueIsNoneException For Null

#1159
@louthy
Copy link
Owner

louthy commented Feb 5, 2023

This works in the latest release, but you need to await the Value property for the above behaviour.

@louthy louthy closed this as completed Feb 5, 2023
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

No branches or pull requests

3 participants