# HG changeset patch # User Tomas Lindquist Olsen # Date 1241875647 -7200 # Node ID b8c2f3e05b5252b155b244e6f672bdc6fa40c3a8 # Parent d55945bcb02de92ecdd02c2264fe7c6de39c642d Fixed compile unit for debug info for array operations, fixed ticket #280 . diff -r d55945bcb02d -r b8c2f3e05b52 gen/todebug.cpp --- a/gen/todebug.cpp Sat May 09 08:58:55 2009 +0200 +++ b/gen/todebug.cpp Sat May 09 15:27:27 2009 +0200 @@ -95,10 +95,19 @@ // get the module the symbol is in, or - for template instances - the current module static Module* getDefinedModule(Dsymbol* s) { - if (!DtoIsTemplateInstance(s)) - return s->getModule(); - else - return gIR->dmodule; + // templates are defined in current module + if (DtoIsTemplateInstance(s)) + { + return gIR->dmodule; + } + // array operations as well + else if (FuncDeclaration* fd = s->isFuncDeclaration()) + { + if (fd->isArrayOp) + return gIR->dmodule; + } + // otherwise use the symbol's module + return s->getModule(); } //////////////////////////////////////////////////////////////////////////////////////////////////