[Issue 15165] New: [Reg 2.069-devel] Can no longer use GetOptException with enforceEx
    via Digitalmars-d-bugs 
    digitalmars-d-bugs at puremagic.com
       
    Mon Oct  5 23:12:36 PDT 2015
    
    
  
https://issues.dlang.org/show_bug.cgi?id=15165
          Issue ID: 15165
           Summary: [Reg 2.069-devel] Can no longer use GetOptException
                    with enforceEx
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: code at dawg.eu
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))))
----
--
    
    
More information about the Digitalmars-d-bugs
mailing list