Bug 7267 – nothrow functions with lazy arguments too

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-01-10T20:43:00Z
Last change time
2015-02-17T06:57:25Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-01-10T20:43:27Z
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.
Comment #1 by pro.mathias.lang — 2015-02-17T06:56:40Z
#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 ***
Comment #2 by pro.mathias.lang — 2015-02-17T06:57:25Z
*** This issue has been marked as a duplicate of issue 12647 ***