www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11773] New: `inout` `function`/`delegate` should be implicitly convertible to mutable/`const`/`immutable`

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



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: -------
Dec 19 2013
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11773


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



08:08:22 PST ---
This seems similar to Issue 7725, which is another dupe of Issue 3075.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 19 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11773




22:22:52 MSK ---

 This seems similar to Issue 7725, which is another dupe of Issue 3075.
Yes, but this one is about `inout`. Probably may be closed and original test added to Issue 3075. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 19 2013
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=11773


Denis Shelomovskij <verylonglogin.reg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



22:26:21 MSK ---
*** This issue has been marked as a duplicate of issue 3075 ***

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