Merged DMD commit 0d6f04cf9cb9689beeddc05498e464c4c8f88727:

bugzilla 3043 Template symbol arg cannot be demangled
This commit is contained in:
David Nadlinger
2011-04-22 18:29:00 +02:00
parent 108e423d83
commit f3ebce5cd6

View File

@@ -4233,7 +4233,15 @@ Identifier *TemplateInstance::genIdent()
error("forward reference of %s", d->toChars());
else
{
char *p = sa->mangle();
const char *p = sa->mangle();
/* Bugzilla 3043: if the first character of p is a digit this
* causes ambiguity issues because the digits of the two numbers are adjacent.
* Current demanglers resolve this by trying various places to separate the
* numbers until one gets a successful demangle.
* Unfortunately, fixing this ambiguity will break existing binary
* compatibility and the demanglers, so we'll leave it as is.
*/
buf.printf("%zu%s", strlen(p), p);
}
}