* Update BuildTools, CoreClr to preview4-04022-01, preview6-27721-71, respectively
* Use `Nullable=enable` rather than `NullableContextOptions=enable`
* Resolving new nullability warnings
* PR Feedback
Commit migrated from https://github.com/dotnet/coreclr/commit/
b2b7cabf57abd275a34284b28896852258e650f1
-3.0.0-preview4-03930-01
+3.0.0-preview4-04022-01
-3.0.0-preview6-27702-71
+3.0.0-preview6-27721-71
<!-- Source of truth for dependency tooling: the commit hash of the dotnet/versions master branch as of the last auto-upgrade. -->
<PropertyGroup>
- <CoreClrCurrentRef>f1ee12b0dab462d0f58b87e878250146a125d9ff</CoreClrCurrentRef>
- <BuildToolsCurrentRef>9519ad281b838b0b2bffa86b2837994d4f7c41d3</BuildToolsCurrentRef>
+ <CoreClrCurrentRef>00797464e62272e9c721a1854abe49ff05743bdf</CoreClrCurrentRef>
+ <BuildToolsCurrentRef>00797464e62272e9c721a1854abe49ff05743bdf</BuildToolsCurrentRef>
</PropertyGroup>
<!-- Tests/infrastructure dependency versions. -->
<PropertyGroup>
- <MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview6-27702-71</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
+ <MicrosoftNETCoreRuntimeCoreCLRPackageVersion>3.0.0-preview6-27721-71</MicrosoftNETCoreRuntimeCoreCLRPackageVersion>
<XunitPackageVersion>2.4.1-pre.build.4059</XunitPackageVersion>
<XunitPerformanceApiPackageVersion>1.0.0-beta-build0015</XunitPerformanceApiPackageVersion>
<MicrosoftDiagnosticsTracingTraceEventPackageVersion>2.0.40</MicrosoftDiagnosticsTracingTraceEventPackageVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Remove CS8608 once https://github.com/dotnet/roslyn/issues/23268 is resolved -->
<NoWarn>649,1573,1591,0419,3021,CS8609</NoWarn>
- <NullableContextOptions>enable</NullableContextOptions>
+ <Nullable>enable</Nullable>
<!-- Ignore all previous constants since SPCL is sensitive to what is defined and the Sdk adds some by default -->
<DefineConstants>CORECLR;netcoreapp</DefineConstants>
}
// Context callback: same sig for SendOrPostCallback and ContextCallback
internal static ContextCallback _ccb = new ContextCallback(IOCompletionCallback_Context);
- internal static void IOCompletionCallback_Context(object state)
+ internal static void IOCompletionCallback_Context(object? state)
{
- _IOCompletionCallback helper = (_IOCompletionCallback)state;
+ _IOCompletionCallback? helper = (_IOCompletionCallback?)state;
Debug.Assert(helper != null, "_IOCompletionCallback cannot be null");
helper._ioCompletionCallback(helper._errorCode, helper._numBytes, helper._pNativeOverlapped);
}
}
}
- private static void TracingStatusChangedHandler(object sender, WFD.TracingStatusChangedEventArgs args)
+ private static void TracingStatusChangedHandler(object? sender, WFD.TracingStatusChangedEventArgs args)
{
if (args.Enabled)
f_LoggingOn |= Loggers.CausalityTracer;
<Import_RootNamespace />
</PropertyGroup>
<PropertyGroup>
- <NullableContextOptions>enable</NullableContextOptions>
+ <Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<TargetsWindows Condition="'$(TargetsWindows)' != 'true'">false</TargetsWindows>
/// <summary>Invokes the action and event callbacks.</summary>
/// <param name="state">The progress value.</param>
- private void InvokeHandlers(object state)
+ private void InvokeHandlers(object? state)
{
- T value = (T)state;
+ T value = (T)state!;
Action<T>? handler = _handler;
EventHandler<T> changedEvent = ProgressChanged;
// RespectParentCancellation.
Task t = new Task(new Action<object>(delegate
{
- FromAsyncCoreLogic(asyncResult, endFunction, endAction, promise, requiresSynchronization: true);
+ FromAsyncCoreLogic(asyncResult!, endFunction, endAction, promise, requiresSynchronization: true); // TODO-NULLABLE: https://github.com/dotnet/csharplang/issues/538
}),
(object?)null, null,
default, TaskCreationOptions.None, InternalTaskOptions.None, null);
}
}
- private static void WaitOrTimerCallback_Context_t(object state) =>
+ private static void WaitOrTimerCallback_Context_t(object? state) =>
WaitOrTimerCallback_Context(state, timedOut: true);
- private static void WaitOrTimerCallback_Context_f(object state) =>
+ private static void WaitOrTimerCallback_Context_f(object? state) =>
WaitOrTimerCallback_Context(state, timedOut: false);
- private static void WaitOrTimerCallback_Context(object state, bool timedOut)
+ private static void WaitOrTimerCallback_Context(object? state, bool timedOut)
{
- _ThreadPoolWaitOrTimerCallback helper = (_ThreadPoolWaitOrTimerCallback)state;
+ _ThreadPoolWaitOrTimerCallback helper = (_ThreadPoolWaitOrTimerCallback)state!;
helper._waitOrTimerCallback(helper._state, timedOut);
}