fixes #12420 [backport] (#12456)

This commit is contained in:
Andreas Rumpf
2019-10-18 22:13:24 +02:00
committed by GitHub
parent 6b157e5f73
commit 832b0a0232
4 changed files with 14 additions and 8 deletions

View File

@@ -47,12 +47,9 @@ proc demanglePackageName*(path: string): string =
proc withPackageName*(conf: ConfigRef; path: AbsoluteFile): AbsoluteFile =
let x = getPackageName(conf, path.string)
if x.len == 0:
result = path
let (p, file, ext) = path.splitFile
if x == "stdlib":
# Hot code reloading now relies on 'stdlib_system' names etc.
result = p / RelativeFile((x & '_' & file) & ext)
else:
let (p, file, ext) = path.splitFile
if x == "stdlib":
# Hot code reloading now relies on 'stdlib_system' names etc.
result = p / RelativeFile((x & '_' & file) & ext)
else:
result = p / RelativeFile(fakePackageName(conf, path))
result = p / RelativeFile(fakePackageName(conf, path))

View File

@@ -0,0 +1,2 @@
proc burnMem*(a: int) =
discard

View File

@@ -0,0 +1,2 @@
# module b/utils.nim
let x* = 10

View File

@@ -0,0 +1,5 @@
import a/utils as autils, b/utils
# bug #12420
burnMem(x)