浏览代码

Fix AsyncEnumerableQuery to support ValueTask<T> aggregates.

Bart De Smet 6 年之前
父节点
当前提交
1db4db95d3
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Ix.NET/Source/System.Linq.Async.Queryable/System/Linq/AsyncEnumerableQuery.cs

+ 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));
             }