https://issues.dlang.org/show_bug.cgi?id=22981 --- Comment #2 from Max Samukha <maxsamukha at gmail.com> --- > However, it does if the template instance is aliased inside the type: template E_() { mixin ("enum E_ {", S.attr, "}"); } struct S { alias E = E_!(); E e; enum attr = "a"; } --