summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/js/tcopying.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/js/tcopying.nim b/tests/js/tcopying.nim
new file mode 100644
index 000000000..4f72d6ada
--- /dev/null
+++ b/tests/js/tcopying.nim
@@ -0,0 +1,13 @@
+discard """
+  output: '''123
+'''
+"""
+
+type MyArray = array[1, int]
+
+proc changeArray(a: var MyArray) =
+    a = [123]
+
+var a : MyArray
+changeArray(a)
+echo a[0]