[Issue 7053] New: inout implicit conversion error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 2 10:37:28 PST 2011


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 at puremagic.com
        ReportedBy: wfunction at hotmail.com


--- Comment #0 from wfunction at hotmail.com 2011-12-02 10:36:23 PST ---
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: -------


More information about the Digitalmars-d-bugs mailing list