When compiled with github HEAD, I get:
test.d(6): Error: outer class Foo 'this' needed to 'new' nested class Frop
For now the workaround is to declare Frop static.
// static
class Frop(alias t) { }
void build(G)(G g) {
alias E = typeof(g.tupleof[0]);
g.tupleof[0] = new E;
}
class Tx {
class Foo {
Frop!a cp_a;
int a;
}
Foo bar;
this() { bar = new Foo; }
}
void main() {
Tx tx ;
tx = new Tx;
tx.bar.build;
}
Comment #1 by robert.schadek — 2024-12-13T18:52:05Z