[Issue 12647] Lazy parameter evaluation should be marked as nothrow

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Dec 22 22:01:08 PST 2016


https://issues.dlang.org/show_bug.cgi?id=12647

greenify <greeenify at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greeenify at gmail.com

--- Comment #6 from greenify <greeenify at gmail.com> ---
This a really annoying limitation during the process of annotating Phobos
unittests.
It leads from a nice one-liner, e.g.

assertThrown!AssertError(arr.stride(0));

to be replaced with 10 lines:

bool passed = false;
scope (success) assert(passed);
try
{
    cast(void) arr.stride(0);
}
catch (AssertError unused)
{
    passed = true;
}

--


More information about the Digitalmars-d-bugs mailing list