mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
@@ -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)
|
||||
Reference in New Issue
Block a user