in src/Microsoft.VisualStudio.Validation/Assumes.cs [240:257]
public static T NotReachable<T>()
{
// Keep these two as separate lines of code, so the debugger can come in during the assert dialog
// that the exception's constructor displays, and the debugger can then be made to skip the throw
// in order to continue the investigation.
var exception = new InternalErrorException();
bool proceed = true; // allows debuggers to skip the throw statement
if (proceed)
{
throw exception;
}
else
{
#pragma warning disable CS8763 // A method marked [DoesNotReturn] should not return.
return default;
#pragma warning restore CS8763 // A method marked [DoesNotReturn] should not return.
}
}