From e749fc08e765152f2a60b6af646d19314b86c0dc Mon Sep 17 00:00:00 2001 From: cooldome Date: Fri, 5 Apr 2019 13:50:57 +0100 Subject: fixes #10943 (#10947) --- tests/constr/a_module.nim | 6 ++++++ tests/constr/tglobal.nim | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 tests/constr/a_module.nim create mode 100644 tests/constr/tglobal.nim (limited to 'tests') 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 -- cgit 1.4.1-2-gfad0