fixes #5050; fixes #11826 (#12606) [backport]

This commit is contained in:
cooldome 2019-11-07 13:47:26 +00:00 • committed by Andreas Rumpf
commit e1b1759439
5 changed files with 47 additions and 14 deletions

View file

@ -153,7 +153,11 @@ proc myImportModule(c: PContext, n: PNode; importStmtResult: PNode): PSym =
err.add toFullPath(c.config, c.graph.importStack[i]) & " imports " &
toFullPath(c.config, c.graph.importStack[i+1])
c.recursiveDep = err
discard pushOptionEntry(c)
result = importModuleAs(c, n, c.graph.importModuleCallback(c.graph, c.module, f))
popOptionEntry(c)
#echo "set back to ", L
c.graph.importStack.setLen(L)
# we cannot perform this check reliably because of