From 64accd1c573937f523812b36cf072e147715b1c9 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 8 Jun 2023 19:06:47 +0800 Subject: fixes {.global.} ref typedesc regressions (#22046) --- tests/global/tglobal2.nim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'tests') 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) -- cgit 1.4.1-2-gfad0