diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-06-08 19:06:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-08 13:06:47 +0200 |
commit | 64accd1c573937f523812b36cf072e147715b1c9 (patch) | |
tree | 1095e623af099d25b5015f895c6795f252d6fc0d /tests | |
parent | 6514eaa8e00654d5866eff8df764ebde0b251600 (diff) | |
download | Nim-64accd1c573937f523812b36cf072e147715b1c9.tar.gz |
fixes {.global.} ref typedesc regressions (#22046)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/global/tglobal2.nim | 12 |
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) |