parent
6b157e5f73
commit
832b0a0232
4 changed files with 14 additions and 8 deletions
|
|
@ -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))
|
||||
|
|
|
|||
2
tests/modules/a/utils.nim
Normal file
2
tests/modules/a/utils.nim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
proc burnMem*(a: int) =
|
||||
discard
|
||||
2
tests/modules/b/utils.nim
Normal file
2
tests/modules/b/utils.nim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# module b/utils.nim
|
||||
let x* = 10
|
||||
5
tests/modules/tutils_ab.nim
Normal file
5
tests/modules/tutils_ab.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import a/utils as autils, b/utils
|
||||
|
||||
# bug #12420
|
||||
|
||||
burnMem(x)
|
||||
Loading…
Add table
Add a link
Reference in a new issue