From: Ben Adams Date: Tue, 25 Jul 2017 02:23:50 +0000 (+0100) Subject: ValueTask .ctor throw to Helper X-Git-Tag: accepted/tizen/base/20180629.140029~1083^2~77^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d592209211dcf096e88e22689602a04ac87c6dd7;p=platform%2Fupstream%2Fcoreclr.git ValueTask .ctor throw to Helper --- diff --git a/src/mscorlib/shared/System/Threading/Tasks/ValueTask.cs b/src/mscorlib/shared/System/Threading/Tasks/ValueTask.cs index bafc8f5..4953880 100644 --- a/src/mscorlib/shared/System/Threading/Tasks/ValueTask.cs +++ b/src/mscorlib/shared/System/Threading/Tasks/ValueTask.cs @@ -71,7 +71,12 @@ namespace System.Threading.Tasks /// The task. public ValueTask(Task task) { - _task = task ?? throw new ArgumentNullException(nameof(task)); + if (task == null) + { + ThrowHelper.ThrowArgumentNullException(ExceptionArgument.task); + } + + _task = task; _result = default(TResult); } diff --git a/src/mscorlib/src/System/ThrowHelper.cs b/src/mscorlib/src/System/ThrowHelper.cs index ff76738..b4fc5a8 100644 --- a/src/mscorlib/src/System/ThrowHelper.cs +++ b/src/mscorlib/src/System/ThrowHelper.cs @@ -416,7 +416,8 @@ namespace System type, stateMachine, pHandle, - values + values, + task } //