diff gen/llvmhelpers.cpp @ 1408:afecdb8ee962

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.
author Christian Kamm <kamm incasoftware de>
date Fri, 22 May 2009 10:17:47 +0200
parents e5c5d354c649
children e57859ca8f1e
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Thu May 21 18:08:31 2009 +0200
+++ b/gen/llvmhelpers.cpp	Fri May 22 10:17:47 2009 +0200
@@ -1369,13 +1369,13 @@
 {
     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);