Typifiy an always throwing method as noreturn (#7834)

This commit is contained in:
Ate Eskola 2021-05-05 02:56:48 +00:00 committed by GitHub
parent efced87ae8
commit 5e55db84c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -509,7 +509,7 @@ T enforce(T)(T value, lazy Throwable ex)
assertThrown!ConvException(convEnforce(false, "blah"));
}
private void bailOut(E : Throwable = Exception)(string file, size_t line, scope const(char)[] msg)
private noreturn bailOut(E : Throwable = Exception)(string file, size_t line, scope const(char)[] msg)
{
static if (is(typeof(new E(string.init, string.init, size_t.init))))
{