Greetings

Please look at the code down here. When compiled and run, I get the message "Call to postblit" printed. I think it is because of the foreach block, because the variable "i" is not declared as ref there. Is there a way to make it a ref?

Regards
- Puneet

import std.stdio;

struct Foo {
  this(this) {
    writeln("Call to postblit");
  }
}

class Bar {
  Foo foo;
  this() {
    foreach(i, f; this.tupleof) {
      // do nothing
    }
  }
}

void main()
{
  Bar bar = new Bar();
}