[Issue 12647] New: Lazy parameter evaluation should be marked as nothrow
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Apr 25 06:57:54 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12647
Issue ID: 12647
Summary: Lazy parameter evaluation should be marked as nothrow
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
This code should work, but doesn't.
void assertThrown(E)(lazy E expression)
{
expression();
}
void main() nothrow
{
assertThrown( 0 );
}
Currently lazy parameter evaluation `epxression()` is treated as @safe and
pure, but does not marked as nothrow. It's a bug.
--
More information about the Digitalmars-d-bugs
mailing list