www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7053] New: inout implicit conversion error

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7053

           Summary: inout implicit conversion error
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: wfunction hotmail.com



inout() should NOT be treated as a type constructor, which changes the return
type:


class C(T) { inout this(inout(T)) { } }
C!T slice(T)(auto ref T c) { return new C!T(c); }
void main() { [1, 2, 3, 4, 5].slice(); }

//Test.d(2): Error: cannot implicitly convert expression (new C(items))

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 02 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7053


Maksim Zholudev <maximzms gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |maximzms gmail.com
         Resolution|                            |WORKSFORME



PDT ---
No errors with DMD from GitHub:
https://github.com/D-Programming-Language/dmd/commit/ba281aea010b4772c55fcec08a61f7eea8872436

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