digitalmars.D.bugs - [Issue 12647] New: Lazy parameter evaluation should be marked as
- via Digitalmars-d-bugs (26/26) Apr 25 2014 https://issues.dlang.org/show_bug.cgi?id=12647
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 puremagic.com Reporter: k.hara.pg 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. --
Apr 25 2014