www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3045] New: Can't use ref with foreach on tuple

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

           Summary: Can't use ref with foreach on tuple
           Product: D
           Version: 2.030
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: sean invisibleduck.org


This code should compile:

    void fn(T...)( ref T args )
    {
        foreach( ref e; args )
            e = e.init;
    }

    void main()
    {
        int x, y;
        fn( x, y );
    }

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 01 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3045


David Simcha <dsimcha yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dsimcha yahoo.com
         Resolution|                            |DUPLICATE





---


*** This issue has been marked as a duplicate of issue 2411 ***

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