Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Fix compilation errors due to negligence...
Browse files Browse the repository at this point in the history
  • Loading branch information
manofstick committed Mar 1, 2017
1 parent 00e949f commit 77d3a7f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/mscorlib/src/System/Lazy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ internal LazyHelper(LazyThreadSafetyMode mode, Exception exception)

internal void ThrowException()
{
Debug.Assert((_exceptionDispatch != null, "execution path is invalid");
Debug.Assert(_exceptionDispatch != null, "execution path is invalid");

_exceptionDispatch.Throw();
}
Expand Down Expand Up @@ -138,7 +138,7 @@ private LazyThreadSafetyMode GetMode()
return state.GetMode();
}

internal static bool GetIsValueFaulted() => state?._exceptionDispatch != null;
internal static bool GetIsValueFaulted(LazyHelper state) => state?._exceptionDispatch != null;

internal static LazyHelper Create(LazyThreadSafetyMode mode, bool useDefaultConstructor)
{
Expand Down Expand Up @@ -525,14 +525,17 @@ internal T ValueForDebugDisplay
/// </remarks>
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
public T Value
{
while (true)
{
get
{
if (_state == null)
return _value;
while (true)
{
if (_state == null)
return _value;

CreateValue();
Debug.Assert(_state == null);
CreateValue();
Debug.Assert(_state == null);
}
}
}
}
Expand Down

0 comments on commit 77d3a7f

Please sign in to comment.