Thread overview
[Issue 7004] New: Iterating tuple with index which explicitly typed as size_t causes error
Nov 25, 2011
Kenji Hara
[Issue 7004] Iterating tuple with index which explicitly typed as size_t causes an error
Nov 25, 2011
Kenji Hara
Nov 26, 2011
Walter Bright
November 25, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7004

           Summary: Iterating tuple with index which explicitly typed as
                    size_t causes error
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2011-11-25 01:33:33 PST ---
void f(A...)(A args)
{
    foreach (i, e; args){}        // OK
    foreach (uint i, e; args){}   // OK
    foreach (size_t i, e; args){} // NG
}
void main()
{
    f(1, 3.14);
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 25, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7004


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch
            Summary|Iterating tuple with index  |Iterating tuple with index
                   |which explicitly typed as   |which explicitly typed as
                   |size_t causes error         |size_t causes an error


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-11-25 01:44:29 PST ---
D2 patch: https://github.com/D-Programming-Language/dmd/pull/533

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
November 26, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7004


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-11-25 16:09:43 PST ---
https://github.com/D-Programming-Language/dmd/commit/81842ad6687d4c114bdb6d4dddf0e75778c016b3

https://github.com/D-Programming-Language/dmd/commit/4d1146b65d8a21e787c1aa77adedd3a15b49bf2f

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