fixes 'import x as y' regression

This commit is contained in:
Araq 2014-10-22 01:54:27 +02:00
commit fa77547310
2 changed files with 3 additions and 2 deletions

View file

@ -153,7 +153,7 @@ proc importModuleAs(n: PNode, realModule: PSym): PSym =
localError(n.info, errGenerated, "module alias must be an identifier")
elif n.sons[1].ident.id != realModule.name.id:
# some misguided guy will write 'import abc.foo as foo' ...
result = createModuleAlias(realModule, n.sons[1].ident, n.sons[1].info)
result = createModuleAlias(realModule, n.sons[1].ident, realModule.info)
proc myImportModule(c: PContext, n: PNode): PSym =
var f = checkModuleName(n)