From dd2c12f2c03a7a6ebf205ae3e94b6c4bc9c0ae3f Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Sat, 23 Apr 2011 18:33:57 +0200 Subject: [PATCH] Merged DMD commit ac11d09afb39556fd995fba2481c274e40437d39: merge --- dmd/template.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/dmd/template.c b/dmd/template.c index 7c3aaf86..e1b9827a 100644 --- a/dmd/template.c +++ b/dmd/template.c @@ -1,6 +1,6 @@ // Compiler implementation of the D programming language -// Copyright (c) 1999-2010 by Digital Mars +// Copyright (c) 1999-2011 by Digital Mars // All Rights Reserved // written by Walter Bright // http://www.digitalmars.com @@ -443,6 +443,15 @@ void TemplateDeclaration::semantic(Scope *sc) //sc->module->toModuleAssert(); } +#if DMDV2 + if (/*global.params.useUnitTests &&*/ sc->module) + { + // Generate this function as it may be used + // when template is instantiated in other modules + sc->module->toModuleUnittest(); + } +#endif + /* Remember Scope for later instantiations, but make * a copy since attributes can change. */