← Back to index
|
Original Bugzilla link
Bug 19549 – -check=in=off doesn't work
Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-01-04T16:23:48Z
Last change time
2023-04-25T13:48:26Z
Assigned to
No Owner
Creator
Seb
Comments
Comment #0
by greensunny12 — 2019-01-04T16:23:48Z
// REQUIRED_ARGS: -check=in=off -check=invariant=off // PERMUTE_ARGS: class C { int foo(int a) in { assert(a != 0); } // skipped out(res) { assert(res != 0, "out"); } // triggered body { return a; } invariant // skipped { assert(false); } } void main() { import core.exception : AssertError; auto c = new C; bool catched; try c.foo(0); catch (AssertError e) { assert(e.msg == "out"); catched = e.msg == "out"; } if (!catched) assert(0); }
Comment #1
by greensunny12 — 2019-01-04T16:36:53Z
PR
https://github.com/dlang/dmd/pull/9195
Comment #2
by razvan.nitu1305 — 2023-04-25T13:48:26Z
Fixed by:
https://github.com/dlang/dmd/pull/9195