summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorcooldome <ariabushenko@gmail.com>2020-09-04 09:26:14 +0100
committerGitHub <noreply@github.com>2020-09-04 10:26:14 +0200
commit77df02313d92859cd0d8faa87a139b4b6ea0f7d9 (patch)
tree2208613cfc87a3714aeb9fcd14a007ff69dd37bd /tests
parent4fb17bc03be3046d8ff619a74eec7cb7ce02b4d2 (diff)
downloadNim-77df02313d92859cd0d8faa87a139b4b6ea0f7d9.tar.gz
fix #15238 (#15262)
* fix_15238

* fix test
Diffstat (limited to 'tests')
-rw-r--r--tests/arc/t14383.nim18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/arc/t14383.nim b/tests/arc/t14383.nim
index 742088937..412e11326 100644
--- a/tests/arc/t14383.nim
+++ b/tests/arc/t14383.nim
@@ -4,6 +4,7 @@ discard """
 hello
 hello
 @[4, 3, 2, 1]
+@["a", "b"]
 '''
 """
 
@@ -26,4 +27,19 @@ proc timSort(lst: var openArray[int]) =
 
 var a = @[4, 3, 2, 1]
 timSort(a)
-echo a
\ No newline at end of file
+echo a
+
+
+#------------------------------------------------------------------------------
+# Issue #15238
+#------------------------------------------------------------------------------
+
+proc sinkArg(x: sink seq[string]) =
+  discard
+
+proc varArg(lst: var seq[string]) = 
+  sinkArg(lst)
+
+var x = @["a", "b"]
+varArg(x)
+echo x