Skip to content

Commit

Permalink
Tweak assert in AsyncTaskMethodBuilder (#87215)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephentoub authored Jun 7, 2023
1 parent a2656af commit dd715a0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public ref ExecutionContext? Context
{
get
{
Debug.Assert(m_stateObject is null || m_stateObject is ExecutionContext, $"{nameof(m_stateObject)} must only be for ExecutionContext but contained {m_stateObject}.");
Debug.Assert(m_stateObject is null or ExecutionContext, $"Expected {nameof(m_stateObject)} to be null or an ExecutionContext but was {(m_stateObject is object o ? o.GetType().ToString() : "(null)")}.");
return ref Unsafe.As<object?, ExecutionContext?>(ref m_stateObject);
}
}
Expand Down

0 comments on commit dd715a0

Please sign in to comment.