comparison 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
comparison
equal deleted inserted replaced
1406:eb7cb41ee585 1408:afecdb8ee962
279 fd->linkage = LINKd; 279 fd->linkage = LINKd;
280 280
281 // special attention for array ops 281 // special attention for array ops
282 fd->isArrayOp = true; 282 fd->isArrayOp = true;
283 283
284 sc->module->members->push(fd); 284 sc->module->importedFrom->members->push(fd);
285 285
286 sc = sc->push(); 286 sc = sc->push();
287 sc->parent = sc->module; 287 sc->parent = sc->module->importedFrom;
288 sc->stc = 0; 288 sc->stc = 0;
289 sc->linkage = LINKd; 289 sc->linkage = LINKd;
290 fd->semantic(sc); 290 fd->semantic(sc);
291 sc->pop(); 291 sc->pop();
292 // } 292 // }