summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authoryglukhov <yuriy.glukhov@gmail.com>2015-06-11 15:55:46 +0300
committeryglukhov <yuriy.glukhov@gmail.com>2015-06-11 23:32:08 +0300
commit6436d1920c4b7754caede5d1d4e535666a2debea (patch)
tree187872626bc7db1d0f6ec670317c5dce59f2e211 /tests
parenta041ef68a144a85dafcafa8ffd847d17d0c33974 (diff)
downloadNim-6436d1920c4b7754caede5d1d4e535666a2debea.tar.gz
Fixed copying of aggregates in JS.
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]