Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
1406:eb7cb41ee585 | 1408:afecdb8ee962 |
---|---|
1367 | 1367 |
1368 bool mustDefineSymbol(Dsymbol* s) | 1368 bool mustDefineSymbol(Dsymbol* s) |
1369 { | 1369 { |
1370 if (FuncDeclaration* fd = s->isFuncDeclaration()) | 1370 if (FuncDeclaration* fd = s->isFuncDeclaration()) |
1371 { | 1371 { |
1372 if (fd->isArrayOp) | |
1373 return true; | |
1374 | |
1375 // we can't (and probably shouldn't?) define functions | 1372 // we can't (and probably shouldn't?) define functions |
1376 // that weren't semantic3'ed | 1373 // that weren't semantic3'ed |
1377 if (fd->semanticRun < 4) | 1374 if (fd->semanticRun < 4) |
1378 return false; | 1375 return false; |
1376 | |
1377 if (fd->isArrayOp) | |
1378 return true; | |
1379 } | 1379 } |
1380 | 1380 |
1381 TemplateInstance* tinst = DtoIsTemplateInstance(s); | 1381 TemplateInstance* tinst = DtoIsTemplateInstance(s); |
1382 if (tinst) | 1382 if (tinst) |
1383 { | 1383 { |