Bug 7004 – Iterating tuple with index which explicitly typed as size_t causes an error

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-11-25T01:33:00Z
Last change time
2015-06-09T05:11:51Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2011-11-25T01:33:33Z
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); }
Comment #1 by k.hara.pg — 2011-11-25T01:44:29Z
Comment #2 by bugzilla — 2011-11-25T16:09:43Z