diff dmd/arrayop.c @ 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 04c36605feb9
children def7a1d494fd
line wrap: on
line diff
--- a/dmd/arrayop.c	Thu May 21 18:08:31 2009 +0200
+++ b/dmd/arrayop.c	Fri May 22 10:17:47 2009 +0200
@@ -281,10 +281,10 @@
         // special attention for array ops
         fd->isArrayOp = true;
 
-        sc->module->members->push(fd);
+        sc->module->importedFrom->members->push(fd);
 
         sc = sc->push();
-        sc->parent = sc->module;
+        sc->parent = sc->module->importedFrom;
         sc->stc = 0;
         sc->linkage = LINKd;
         fd->semantic(sc);