From f25454d5c6b455d95aa526b57678ec8494ac0e36 Mon Sep 17 00:00:00 2001 From: Danil Yarantsev Date: Wed, 22 Jul 2020 10:52:38 +0300 Subject: [PATCH] Add a testcase for #14480. Fixes #14480 (#15037) --- tests/arc/tarcmisc.nim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/arc/tarcmisc.nim b/tests/arc/tarcmisc.nim index 56aa3ec3b3..51c80c3484 100644 --- a/tests/arc/tarcmisc.nim +++ b/tests/arc/tarcmisc.nim @@ -257,3 +257,10 @@ echo "new line before - ", newline newline.insert(indent, 0) echo "new line after - ", newline + +# bug #14480 +proc hello(): int = + result = 42 + +var leaves {.global.} = hello() +doAssert leaves == 42