D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7224 - Throwing precondition of nothrow function
Summary: Throwing precondition of nothrow function
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2012-01-04 14:14 UTC by bearophile_hugs
Modified: 2024-12-13 17:57 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2012-01-04 14:14:10 UTC
This function compiles with no errors with DMD 2.058head:


bool foo() {
    throw new Exception("");
}
void main() nothrow
in {
    assert(foo());
} body {}


but main() raises an exception (main() doesn't raise an exception in release mode).
I think this is a problem.
Comment 1 dlangBugzillaToGithub 2024-12-13 17:57:36 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18396

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB