summary refs log tree commit diff stats
path: root/tests/js/tbyvar.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/tbyvar.nim')
-rw-r--r--tests/js/tbyvar.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/js/tbyvar.nim b/tests/js/tbyvar.nim
index 1269e6f66..9714cd56b 100644
--- a/tests/js/tbyvar.nim
+++ b/tests/js/tbyvar.nim
@@ -31,3 +31,13 @@ proc main =
   echo y
 
 main()
+
+# Test: pass var seq to var openarray
+var s = @[2, 1]
+proc foo(a: var openarray[int]) = a[0] = 123
+
+proc bar(s: var seq[int], a: int) =
+  doAssert(a == 5)
+  foo(s)
+s.bar(5)
+doAssert(s == @[123, 1])