Merged DMD commit 6669a7678506cd0dc03018ce3a341396b64d2aad:

bugzilla 2206 unnamed template mixin of class inside function or class has incorrect classinfo and mangleof
This commit is contained in:
David Nadlinger
2011-04-22 18:44:11 +02:00
parent 65bcab0bd5
commit af7559f65c

View File

@@ -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);