From af7559f65c4ee09248fd0927e7b2755188ff56e6 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 22 Apr 2011 18:44:11 +0200 Subject: [PATCH] Merged DMD commit 6669a7678506cd0dc03018ce3a341396b64d2aad: bugzilla 2206 unnamed template mixin of class inside function or class has incorrect classinfo and mangleof --- dmd/mangle.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dmd/mangle.c b/dmd/mangle.c index af8294ed..54186f57 100644 --- a/dmd/mangle.c +++ b/dmd/mangle.c @@ -225,11 +225,12 @@ char *TemplateInstance::mangle() printf("\n"); #endif id = ident ? ident->toChars() : toChars(); + Dsymbol *par = isnested || isTemplateMixin() ? parent : tempdecl->parent; if (!tempdecl) error("is not defined"); - else if (tempdecl->parent) + else if (par) { - char *p = tempdecl->parent->mangle(); + char *p = par->mangle(); if (p[0] == '_' && p[1] == 'D') p += 2; buf.writestring(p);