Backport DMD pull request #1760.

Fixes DMD test case 'xtest46'.
This commit is contained in:
David Nadlinger
2013-03-18 13:04:29 +01:00
parent 99ebf1db6a
commit 7a58b2c1b2

View File

@@ -5081,6 +5081,11 @@ void TemplateInstance::semantic(Scope *sc, Expressions *fargs)
#endif
// Copy the syntax trees from the TemplateDeclaration
#if IN_LLVM // Backport of DMD pull request #1760.
if (members && speculative)
{} // Don't copy again so they were previously created.
else
#endif
members = Dsymbol::arraySyntaxCopy(tempdecl->members);
// Create our own scope for the template parameters
@@ -6644,6 +6649,11 @@ void TemplateMixin::semantic(Scope *sc)
}
// Copy the syntax trees from the TemplateDeclaration
#if IN_LLVM // Backport of DMD pull request #1760.
if (scx && members)
{} // Don't copy again so they were previously created.
else
#endif
members = Dsymbol::arraySyntaxCopy(tempdecl->members);
if (!members)
return;