[Issue 10850] New: Inout substituted incorrectly for delegates in inout function signature

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 19 02:49:24 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10850

           Summary: Inout substituted incorrectly for delegates in inout
                    function signature
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: timon.gehr at gmx.ch


--- Comment #0 from timon.gehr at gmx.ch 2013-08-19 02:49:22 PDT ---
git head:

Since apparently inout now refers to the outermost inout function, inout should
also be substituted for delegates inside the function signature:

inout(int)* delegate(inout(int)*) foo(ref inout(int) x){
    inout(int)* bar(inout(int)*) { return &x; }
    return &bar;
}
immutable(int) x;
static assert(is(typeof(foo(x))==immutable(int)* delegate(immutable(int)*)));

(Also note that none of the recent language updates towards type safe inout
checking were documented.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list