`Merge` masks original exception with an `ArgumentException` about no tasks · Issue #1056 · morelinq/MoreLINQ · GitHub
More Web Proxy on the site http://driver.im/
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
1
2
System.ArgumentException: The tasks argument contains no tasks. (Parameter 'tasks')
at System.Threading.Tasks.Task.WhenAny[TTask](ReadOnlySpan`1 tasks)
at System.Threading.Tasks.Task.WhenAny[TTask](IEnumerable`1 tasks)
at System.Threading.Tasks.Task.WhenAny[TResult](IEnumerable`1 tasks)
at MoreLinq.Experimental.Async.ExperimentalEnumerable.<>c__DisplayClass1_0`1.<<Merge>g__Async|0>d.MoveNext()
--- End of stack trace from previous location ---
at MoreLinq.Experimental.Async.ExperimentalEnumerable.<>c__DisplayClass1_0`1.<<Merge>g__Async|0>d.System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult(Int16 token)
at UserQuery.Main() in C:\Users\johndoe\AppData\Local\Temp\LINQPad8\_hiuxehhq\uljkai\LINQPadQuery:line 7
at UserQuery.Main() in C:\Users\johndoe\AppData\Local\Temp\LINQPad8\_hiuxehhq\uljkai\LINQPadQuery:line 7
It throws ArgumentException when it should have thrown Exception.
The problem seems to be due to the following clean-up loop, which can call Task.WhenAny with zero tasks:
Code to reproduce:
When run, it will output:
It throws
ArgumentException
when it should have thrownException
.The problem seems to be due to the following clean-up loop, which can call
Task.WhenAny
with zero tasks:MoreLINQ/MoreLinq/Experimental/Async/Merge.cs
Lines 204 to 211 in 0e154ef
The text was updated successfully, but these errors were encountered: