We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Namespace HLib.Tasks Friend Partial Module TaskExtensions <Extension()> Async Function [Then](Of T)(ByVal task As Task, ByVal f As Func(Of Task(Of T))) As Task(Of T) Await task Return Await f() End Function <Extension()> Async Function [Then](ByVal task As Task, ByVal f As Func(Of Task)) As Task Await task Await f() End Function <Extension()> Async Function [Then](Of T, U)(ByVal task As Task(Of T), ByVal f As Func(Of T, Task(Of U))) As Task(Of U) Return Await f(Await task) End Function <Extension()> Async Function [Then](Of T)(ByVal task As Task(Of T), ByVal f As Func(Of T, Task)) As Task Await f(Await task) End Function End Module End Namespace
namespace HLib.HLib.Tasks { internal static partial class TaskExtensions { public async static Task<T> Then<T>(this Task task, Func<Task<T>> f) { await task; return await f(); } public async static Task Then(this Task task, Func<Task> f) { await task; await f(); return default(Task); } public async static Task<U> Then<T, U>(this Task<T> task, Func<T, Task<U>> f) { return await f(await task); } public async static Task Then<T>(this Task<T> task, Func<T, Task> f) { await f(await task); return default(Task); } } }
namespace HLib.Tasks { internal static partial class TaskExtensions { public async static Task<T> Then<T>(this Task task, Func<Task<T>> f) { await task; return await f(); } public async static Task Then(this Task task, Func<Task> f) { await task; await f(); } public async static Task<U> Then<T, U>(this Task<T> task, Func<T, Task<U>> f) { return await f(await task); } public async static Task Then<T>(this Task<T> task, Func<T, Task> f) { await f(await task); } } }
The text was updated successfully, but these errors were encountered:
Great I think this is likely one of the issues mentioned in #316 which I didn't previously have a repro for, thanks!
Looks like the return default logic needs to work differently for async methods
Sorry, something went wrong.
Just checked - this is still broken in latest master dadc812
1a7e389
Fixed in release 8.0.0
GrahamTheCoder
No branches or pull requests
Input code
Erroneous output
Expected output
Details
The text was updated successfully, but these errors were encountered: