[Issue 13011] New: inout delegate parameter cannot receive exactly same type argument

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 30 08:08:44 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=13011

          Issue ID: 13011
           Summary: inout delegate parameter cannot receive exactly same
                    type argument
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: major
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: k.hara.pg at gmail.com

Test case:

size_t hashOf(int delegate() inout val)
{
    return 0;
}
void main()
{
    int delegate() inout dg;
    auto h = hashOf(dg);
}

Output:

test.d(8): Error: cannot implicitly convert expression (dg) of type int
delegate() inout to int delegate() const

--


More information about the Digitalmars-d-bugs mailing list