int foo(lazy int bar) nothrow { return bar(); } void main() { int r = foo(10); } DMD 2.058 head: test.d(2): Error: bar is not nothrow test.d(1): Error: function test4.foo 'foo' is nothrow yet may throw But I think foo() is allowed to be nothrow.
#12647 is a duplicate of this, but has more comments and a P.R. for it, so I'm marking this one as duplicate. *** This issue has been marked as a duplicate of issue 12 ***
*** This issue has been marked as a duplicate of issue 12647 ***