summary refs log tree commit diff stats
path: root/tests/global/tglobal2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/global/tglobal2.nim')
-rw-r--r--tests/global/tglobal2.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/global/tglobal2.nim b/tests/global/tglobal2.nim
new file mode 100644
index 000000000..73a575bbd
--- /dev/null
+++ b/tests/global/tglobal2.nim
@@ -0,0 +1,9 @@
+# b.nim
+import a_module
+doAssert foo() == 0
+
+proc hello(x: type) =
+  var s {.global.} = default(x)
+  doAssert s == 0
+
+hello(int)