I am not sure if this is actually a »known« issue as in »it's on Bugzilla«, but it also happens with unittest blocks. I was just about to start tracking this issue down in a big pile of CTFE-heavy code (https://github.com/klickverbot/thrift/blob/d-gsoc/lib/d/src/thrift/codegen.d#L416) – thanks for the post. ;)

David


On 7/4/11 11:32 PM, jdrewsen wrote:
I was just about to send the curl wrapper I've been working on for RFC
and did a git pull from upstream to be in sync. After that I got a new
error that may be a dmd bug.

The following is some minimal code that triggers the error.


private mixin template A() {
void foo() {}
}

void bar() {
static struct C {
mixin A!();
};
}


testd.d(6): Error: struct testd.bar.C no size yet for forward reference
testd.d(7): Error: mixin testd.bar.C.A!() error instantiating


If I move the struct C out of the function body it compiles ok. Note
that this did actually work before I did a pull from upstream.

Is this a known issue?

/Jonas

Reply via email to