Fix bug #307 by doing what DMD does: add the arrayop to

sc->module->importedFrom instead of sc->module. That way array ops in template
instantiations will be semantic3'ed.
This commit is contained in:
Christian Kamm
2009-05-22 10:17:47 +02:00
parent d537ad0d48
commit c433604243
2 changed files with 5 additions and 5 deletions

View File

@@ -1369,13 +1369,13 @@ bool mustDefineSymbol(Dsymbol* s)
{
if (FuncDeclaration* fd = s->isFuncDeclaration())
{
if (fd->isArrayOp)
return true;
// we can't (and probably shouldn't?) define functions
// that weren't semantic3'ed
if (fd->semanticRun < 4)
return false;
if (fd->isArrayOp)
return true;
}
TemplateInstance* tinst = DtoIsTemplateInstance(s);