Bug 13123 – Disallow throwing contracts for nothrow functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-13T16:07:27Z
Last change time
2022-09-04T15:52:27Z
Keywords
accepts-invalid, bootcamp, pull
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2014-07-13T16:07:27Z
dmd 2.066beta3 compiles this code: void foo() nothrow in { throw new Exception(null); } body { } void main() {}
Comment #1 by issues.dlang — 2016-10-12T21:59:13Z
This is still a problem.
Comment #2 by dlang-bot — 2022-08-28T10:00:50Z
@wolframw updated dlang/dmd pull request #14383 "Fix Issue 13123 - Disallow throwing contracts for nothrow functions" fixing this issue: - Fix Issue 13123 - Disallow throwing contracts for nothrow functions https://github.com/dlang/dmd/pull/14383