← Back to index
|
Original Bugzilla link
Bug 15165 – [Reg 2.069-devel] Can no longer use GetOptException with enforceEx
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-06T06:12:00Z
Last change time
2015-10-06T06:16:09Z
Assigned to
nobody
Creator
code
Comments
Comment #0
by code — 2015-10-06T06:12:36Z
cat > bug.d << CODE import std.exception : enforceEx; import std.getopt : GetOptException; void main() { enforceEx!GetOptException(true, "msg"); } CODE dmd -c bug ---- bug.d(6): Error: template std.exception.enforceEx cannot deduce function from argument types !(GetOptException)(bool, string), candidates are: DPL/dmd/src/../../phobos/std/exception.d(609): std.exception.enforceEx(E : Throwable) if (is(typeof(new E("", "DPL/dmd/src/../../phobos/std/exception.d", 610)))) DPL/dmd/src/../../phobos/std/exception.d(621): std.exception.enforceEx(E : Throwable) if (is(typeof(new E("DPL/dmd/src/../../phobos/std/exception.d", 622))) && !is(typeof(new E("", "DPL/dmd/src/../../phobos/std/exception.d", 622)))) ----
Comment #1
by code — 2015-10-06T06:16:09Z
https://github.com/D-Programming-Language/phobos/pull/3697
https://github.com/D-Programming-Language/phobos/commit/d929cea294d3477684e36b3cda3a8d0ec31e21d8