[Issue 11773] New: `inout` `function`/`delegate` should be implicitly convertible to mutable/`const`/`immutable`

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 19 06:46:11 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11773

           Summary: `inout` `function`/`delegate` should be implicitly
                    convertible to mutable/`const`/`immutable`
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-12-19 18:46:10 MSK ---
This code should compile:
---
void main()
{
    inout(int*) function(inout int*) funcInout;
    int* function(int*) funcM = funcInout; // Error: cannot implicitly convert
    const(int*) function(const int*) funcC = funcInout; // same error
    immutable(int*) function(immutable int*) funcI = funcInout; // same error

    inout(int*) delegate(inout int*) delInout;
    int* delegate(int*) delM = delInout; // same error
    const(int*) delegate(const int*) delC = delInout; // same error
    immutable(int*) delegate(immutable int*) delI = delInout; // same error
}
---

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


More information about the Digitalmars-d-bugs mailing list