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: [email protected]
Reporter: [email protected]
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.
--