Browse Source

Fix AsyncEnumerableQuery to support ValueTask<T> aggregates.

Bart De Smet 6 years ago
parent
commit
1db4db95d3

+ 1 - 1
Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncEnumerableQuery.cs

@@ -103,7 +103,7 @@ namespace System.Linq
                 throw new ArgumentNullException(nameof(expression));
             }
 
-            if (!typeof(Task<TResult>).IsAssignableFrom(expression.Type))
+            if (!typeof(ValueTask<TResult>).IsAssignableFrom(expression.Type))
             {
                 throw new ArgumentException("The specified expression is not assignable to the result type.", nameof(expression));
             }