template T(bool b) { static assert (b); } template Mix() { void f() {} } class C { alias T!(is(typeof(M.f))) U; mixin Mix!() M; } foo.d(1): Error: static assert (b) is false Moving the alias below the mixin makes the code compile.
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/3a45e50f400ad1ec8bb179c95ee39594028a534f fix Issue 3509 - Cannot forward reference a template mixin's members in a compile-time context
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/ebc3fa912b24182aa3204d0b9c49a59bd3d9d85f fix Issue 3509 - Cannot forward reference a template mixin's members in a compile-time context