[Issue 2271] New: foreach over tuple regression

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 6 16:57:36 PDT 2008


http://d.puremagic.com/issues/show_bug.cgi?id=2271

           Summary: foreach over tuple regression
           Product: D
           Version: 1.033
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: tomas at famolsen.dk


there is a regression for foreach on a tuple:

struct test {
  int foo;
  float bar;
}
void main() {
  test t;
  pragma(msg, typeof(t.tupleof).stringof);
  foreach (entry; t.tupleof) {
    pragma(msg, typeof(entry).stringof);
  }
}

with DMD 1.024 the output is correct:

(int, float)
int
float

However, with DMD 1.033 it's not:

(int, float)
int
int

I don't have any versions between if someone does, please check for earlier
versions :)


-- 



More information about the Digitalmars-d-bugs mailing list