mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-11 22:08:54 +00:00
fixes #9994
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user