This commit is contained in:
cooldome 2019-04-05 13:50:57 +01:00 • committed by Andreas Rumpf
commit e749fc08e7
3 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,6 @@
# a.nim
{.push stackTrace: off.}
proc foo*(): int =
var a {.global.} = 0
result = a
{.pop.}

7
tests/constr/tglobal.nim Normal file
View file

@ -0,0 +1,7 @@
discard """
output: "0"
"""
# b.nim
import a_module
echo foo()