fixes #9994
This commit is contained in:
parent
50193b95ea
commit
b53327c92a
4 changed files with 7 additions and 3 deletions
|
|
@ -102,9 +102,9 @@ proc processImplicits(graph: ModuleGraph; implicits: seq[string], nodeKind: TNod
|
|||
for module in items(implicits):
|
||||
# implicit imports should not lead to a module importing itself
|
||||
if m.position != resolveMod(graph.config, module, relativeTo).int32:
|
||||
var importStmt = newNodeI(nodeKind, gCmdLineInfo)
|
||||
var importStmt = newNodeI(nodeKind, m.info)
|
||||
var str = newStrNode(nkStrLit, module)
|
||||
str.info = gCmdLineInfo
|
||||
str.info = m.info
|
||||
importStmt.addSon str
|
||||
if not processTopLevelStmt(graph, importStmt, a): break
|
||||
|
||||
|
|
|
|||
2
tests/modules/mimport_in_config.nim
Normal file
2
tests/modules/mimport_in_config.nim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
type
|
||||
DefinedInB* = int
|
||||
|
|
@ -3,6 +3,7 @@ output: '''hallo'''
|
|||
joinable: false
|
||||
"""
|
||||
|
||||
# bug #9978
|
||||
# bug #9978, #9994
|
||||
var x: DefinedInB
|
||||
|
||||
echo "hi".replace("i", "allo")
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
--import: "strutils"
|
||||
--import: "mimport_in_config"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue