summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-06-08 19:06:47 +0800
committerGitHub <noreply@github.com>2023-06-08 13:06:47 +0200
commit64accd1c573937f523812b36cf072e147715b1c9 (patch)
tree1095e623af099d25b5015f895c6795f252d6fc0d /tests
parent6514eaa8e00654d5866eff8df764ebde0b251600 (diff)
downloadNim-64accd1c573937f523812b36cf072e147715b1c9.tar.gz
fixes {.global.} ref typedesc regressions (#22046)
Diffstat (limited to 'tests')
-rw-r--r--tests/global/tglobal2.nim12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/global/tglobal2.nim b/tests/global/tglobal2.nim
index 056ac9f81..73a575bbd 100644
--- a/tests/global/tglobal2.nim
+++ b/tests/global/tglobal2.nim
@@ -1,7 +1,9 @@
-discard """
-output: "0"
-"""
-
 # b.nim
 import a_module
-echo foo()
\ No newline at end of file
+doAssert foo() == 0
+
+proc hello(x: type) =
+  var s {.global.} = default(x)
+  doAssert s == 0
+
+hello(int)