Mercurial > projects > ldc
changeset 511:a0b0676e787d
Fixed problem when instantiating a template with private global variables.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Fri, 15 Aug 2008 05:08:33 +0200 |
parents | 6aee82889553 |
children | 0d286cd9fd08 |
files | gen/toobj.cpp |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gen/toobj.cpp Thu Aug 14 06:55:41 2008 +0200 +++ b/gen/toobj.cpp Fri Aug 15 05:08:33 2008 +0200 @@ -621,8 +621,11 @@ // global variable or magic if (isDataseg()) { + Logger::println("data segment"); + // we don't want to touch private static members at all !!! - if ((prot() == PROTprivate) && getModule() != gIR->dmodule) + // template instances should always be emitted + if (!DtoIsTemplateInstance(this) && prot() == PROTprivate && getModule() != gIR->dmodule) return; // don't duplicate work