Bug 14685 – [REG2.067] Silent incorrect behavior with enforce and custom exception

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-06-11T19:55:00Z
Last change time
2017-07-19T17:43:31Z
Keywords
accepts-invalid, pull
Assigned to
nobody
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2015-06-11T19:55:31Z
Today, I wrote the following code: /////////////// test.d ////////////// import std.exception; class NotFoundException : Exception { this() { super("Not found"); } } void main() { enforce!NotFoundException(false); } ///////////////////////////////////// It compiles fine, but does not actually throw anything. This seems to be a regression, as previously it did not compile. Introduced in https://github.com/D-Programming-Language/phobos/pull/2288
Comment #1 by k.hara.pg — 2015-06-22T12:43:10Z
Comment #2 by github-bugzilla — 2015-06-22T20:01:49Z
Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/4f2e16ed39763ab3eecb19b1d24961dfdc77a678 fix Issue 14685 - Silent incorrect behavior with enforce and custom exception https://github.com/D-Programming-Language/phobos/commit/f9795fbafd4b838396955d0fe9fd50649c8f870a Merge pull request #3435 from 9rnsr/fix14685 [REG2.067] Issue 14685 - Silent incorrect behavior with enforce and custom exception
Comment #3 by github-bugzilla — 2015-06-22T20:02:52Z
Commit pushed to stable at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/8c5bd6347b05867d51f61e08f4c77e8313103ddd Merge pull request #3435 from 9rnsr/fix14685 [REG2.067] Issue 14685 - Silent incorrect behavior with enforce and custom exception
Comment #4 by github-bugzilla — 2015-07-25T00:03:23Z
Comment #5 by github-bugzilla — 2015-10-04T18:19:41Z
Comment #6 by github-bugzilla — 2017-07-19T17:43:31Z
Commit pushed to dmd-cxx at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/8c5bd6347b05867d51f61e08f4c77e8313103ddd Merge pull request #3435 from 9rnsr/fix14685