You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The call is ambiguous between the following methods or properties: 'Result.Try(Func<Task>, Func<Exception, IError>)' and 'Result.Try(Func<ValueTask>, Func<Exception, IError>)'
I can of course just not do any async statement lambdas and put the code into dedicated methods but for me this feel a bit verbose and makes quick "try async thing inline" inside methods not so quick
staticTask<Result>Foo(stringinput){return Result.Try(()=> FooInternal(input));}staticasync Task FooInternal(stringinput){//Do something with the inputawait Task.CompletedTask;}
instead of
staticTask<Result>Foo(stringinput){return Result.Try(async()=>{//Do something with the inputawait Task.CompletedTask;});}
Only 8 months too late with this feedback and honestly I wouldn't even have a good suggestion on how one would give ValueTask + Task support in overloads. I tried to think of any Microsoft written API that receive a Task and return a Task but couldn't think of anything similar.
Btw love your library
The text was updated successfully, but these errors were encountered:
Before 3.11.0, these worked and compiled
but with 3.11.0 onwards I get a CS0121
I can of course just not do any async statement lambdas and put the code into dedicated methods but for me this feel a bit verbose and makes quick "try async thing inline" inside methods not so quick
instead of
Only 8 months too late with this feedback and honestly I wouldn't even have a good suggestion on how one would give ValueTask + Task support in overloads. I tried to think of any Microsoft written API that receive a Task and return a Task but couldn't think of anything similar.
Btw love your library
The text was updated successfully, but these errors were encountered: