Comment #0 by verylonglogin.reg — 2012-11-16T11:40:07Z
Note that we have zero context pointer in such postblit call:
---
int i;
struct S
{ this(this) { ++i; } }
void main()
{
S s = S.init;
assert(i == 0); // postblit not called
s = S.init;
assert(i == 0); // postblit not called
int k;
static int j = 0;
struct N
{
this(this)
{
++j;
assert(this.tupleof[$-1] != null); // fails
}
void f() { ++k; }
}
N n = N.init;
assert(j == 0); // fails, j = 1, postblit called
n = N.init;
assert(j == 0); // fails, j = 2, postblit called
}
---
Comment #1 by k.hara.pg — 2012-11-18T20:31:14Z
This is a derived issue from the bug 9035. If it is correctly fixed, this bug will be disappeared.