The following test case: ---- class HomeController { static if (false) { mixin(q{ int a; }); } void foo() { foreach (m; __traits(derivedMembers, HomeController)) { } } } ---- Gives the error: ---- dmd: dsymbol.c:1052: static int ScopeDsymbol::foreach(Dsymbols*, int (*)(void*, size_t, Dsymbol*), void*, size_t*): Assertion `members' failed. ---- On ubuntu 32 and a similar error: ---- Assertion failed: (members), function foreach, file dsymbol.c, line 1052. ---- On OS X 32 and 64. This worked as expected in dmd 2.056.
https://github.com/D-Programming-Language/dmd/pull/584
https://github.com/D-Programming-Language/dmd/commit/afc7cfebdd71b105e9fb78b1023ce706fc7945f5
*** Issue 7368 has been marked as a duplicate of this issue. ***