http://d.puremagic.com/issues/show_bug.cgi?id=3924
Summary: nothrow ignored in some situations Product: D Version: 2.041 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-03-10 06:53:26 PST --- The following programs compile and raise exceptions even if the functions/delegates are marked as nothrow: ------------------ void main() { nothrow void delegate() c = { throw new Exception(""); }; c(); } ------------------ nothrow auto foo() { throw new Exception(""); } void main() { foo(); } ------------------ nothrow auto foo() { auto c = { throw new Exception(""); }; c(); } void main() { foo(); } --------------------------------- While this code that looks correct doesn't compile: pure void foo(pure nothrow void delegate(int) callable) { callable(5); } void main() { pure nothrow void bar(int x) {} foo(&bar); } With the first error: test1.d(1): basic type expected, not pure -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------