diff options
Diffstat (limited to 'tests/pragmas/t12640.nim')
-rw-r--r-- | tests/pragmas/t12640.nim | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/pragmas/t12640.nim b/tests/pragmas/t12640.nim new file mode 100644 index 000000000..c85185699 --- /dev/null +++ b/tests/pragmas/t12640.nim @@ -0,0 +1,26 @@ +discard """ + matrix: "--mm:refc" + nimout: '''1 +2 +3 +[1, 2, 3]''' + + output: '''1 +2 +3 +[1, 2, 3]''' +""" + +# todo fixme it doesn't work with ORC +proc doIt(a: openArray[int]) = + echo a + +proc foo() = + var bug {.global, compiletime.}: seq[int] + bug = @[1, 2 ,3] + for i in 0 .. high(bug): echo bug[i] + doIt(bug) + +static: + foo() +foo() |