import std.stdio;
struct A
{
mixin member!(M1, M2);
}
struct M1 {}
struct M2 {}
mixin template member(children...)
{
static if(children.length)
{
children[0] m;
mixin member!(children[1..$]);
}
}
void main()
{
A a;
writeln(__traits(allMembers, A));
}
--
dmd bugrep.d
dmd: dsymbol.c:1052: static int ScopeDsymbol::foreach(Dsymbols*, int (*)(void*, size_t, Dsymbol*), void*, size_t*): Assertion `members' failed.
Aborted
dmd -v
DMD64 D Compiler v2.057
Copyright (c) 1999-2011 by Digital Mars written by Walter Bright
Documentation: http://www.digitalmars.com/d/2.0/index.html
Comment #1 by k.hara.pg — 2012-01-26T05:59:44Z
Thanks for your reporting, but it was already fixed in git repo.
Please wait the release of 2.058.
*** This issue has been marked as a duplicate of issue 7160 ***