the compiler can now deal with multiple modules of the same name

This commit is contained in:
Araq 2013-09-26 17:34:46 +02:00
commit a0b82db402
13 changed files with 74 additions and 18 deletions

View file

@ -48,7 +48,7 @@ proc getModuleName*(n: PNode): string =
proc checkModuleName*(n: PNode): int32 =
# This returns the full canonical path for a given module import
let modulename = n.getModuleName
let fullPath = findModule(modulename)
let fullPath = findModule(modulename, n.info.toFullPath)
if fullPath.len == 0:
LocalError(n.info, errCannotOpenFile, modulename)
result = InvalidFileIDX