diff --git a/src/e2ir.c b/src/e2ir.c index d91171246d5f..f1a27f0829fb 100644 --- a/src/e2ir.c +++ b/src/e2ir.c @@ -1091,7 +1091,7 @@ elem *toElem(Expression *e, IRState *irs) void visit(DeclarationExp *de) { - //printf("DeclarationExp::toElem() %s\n", detoChars()); + //printf("DeclarationExp::toElem() %s\n", de->toChars()); result = Dsymbol_toElem(de->declaration); } @@ -4826,6 +4826,10 @@ elem *toElem(Expression *e, IRState *irs) { irs->deferToObj->push(ed); } + else if (TemplateInstance *ti = s->isTemplateInstance()) + { + irs->deferToObj->push(ti); + } return e; } diff --git a/test/runnable/mixin2.d b/test/runnable/mixin2.d index c50c35666d1c..861cb23cd4b5 100644 --- a/test/runnable/mixin2.d +++ b/test/runnable/mixin2.d @@ -324,6 +324,24 @@ void test7553() auto r2 = new Bar7553().to_range(1); } +/*********************************************/ +// 13479 + +mixin template F13479() +{ + void t()() + { + } + + alias t!() a; +} + +void test13479() +{ + mixin F13479!(); + a(); +} + /*********************************************/ void main() @@ -339,6 +357,7 @@ void main() test9(); test10(); test7156(); + test13479(); writeln("Success"); }