summary refs log tree commit diff stats
path: root/tests/js
diff options
context:
space:
mode:
authorhlaaftana <hlaaftana@users.noreply.github.com>2019-10-02 22:01:59 +0300
committerAndreas Rumpf <rumpf_a@web.de>2019-10-02 21:01:59 +0200
commitba4315636368e3059212eb13aec59bf19f69aefa (patch)
treecff724152789e0a79724e702e3191e6a1f053228 /tests/js
parentad13e18c7cd008da418770b7f1b8eae696992ced (diff)
downloadNim-ba4315636368e3059212eb13aec59bf19f69aefa.tar.gz
Sets need copying in JS (#11392)
* Sets need copying in JS
* Fixes #11353
* Add test for #11353
Diffstat (limited to 'tests/js')
-rw-r--r--tests/js/t11353.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/js/t11353.nim b/tests/js/t11353.nim
new file mode 100644
index 000000000..c1bc0ad4b
--- /dev/null
+++ b/tests/js/t11353.nim
@@ -0,0 +1,14 @@
+discard """
+  output: '''
+{}
+{}
+'''
+"""
+
+proc foo() =
+  var bar: set[int16] = {}
+  echo bar
+  bar.incl(1)
+
+foo()
+foo()