mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-27 09:43:58 +00:00
fixes #25284 ```nim proc m2() = let v {.global, used.}: string = f2(f2("123")) ``` transform lifted `.global`statements in the top level scope
This commit is contained in:
@@ -55,3 +55,10 @@ block: # bug #24997
|
||||
doAssert not isNil(u(typeof(B.j)))
|
||||
R()
|
||||
discard u(B)
|
||||
|
||||
proc f2(str: string): string = str
|
||||
proc m2() =
|
||||
let v {.global, used.}: string = f2(f2("123"))
|
||||
assert v == "123"
|
||||
|
||||
m2()
|
||||
|
||||
Reference in New Issue
Block a user