diff options
author | cooldome <cdome@bk.ru> | 2019-04-05 13:50:57 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-04-05 14:50:57 +0200 |
commit | e749fc08e765152f2a60b6af646d19314b86c0dc (patch) | |
tree | 5755639c407e1b444c3b3717ab93876d8d6f12d0 /tests | |
parent | efeee326f821f1af69279e23d019ca0a132fa3f5 (diff) | |
download | Nim-e749fc08e765152f2a60b6af646d19314b86c0dc.tar.gz |
fixes #10943 (#10947)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/constr/a_module.nim | 6 | ||||
-rw-r--r-- | tests/constr/tglobal.nim | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/constr/a_module.nim b/tests/constr/a_module.nim new file mode 100644 index 000000000..1d3f4848c --- /dev/null +++ b/tests/constr/a_module.nim @@ -0,0 +1,6 @@ +# a.nim +{.push stackTrace: off.} +proc foo*(): int = + var a {.global.} = 0 + result = a +{.pop.} \ No newline at end of file diff --git a/tests/constr/tglobal.nim b/tests/constr/tglobal.nim new file mode 100644 index 000000000..056ac9f81 --- /dev/null +++ b/tests/constr/tglobal.nim @@ -0,0 +1,7 @@ +discard """ +output: "0" +""" + +# b.nim +import a_module +echo foo() \ No newline at end of file |