summary refs log tree commit diff stats
path: root/tests/js
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-06-29 20:25:42 +0200
committerAndreas Rumpf <rumpf_a@web.de>2017-06-29 20:25:42 +0200
commitac63a9989289bd61542b9b50c25e57e0725383a7 (patch)
treef3148328836e0e9bdfd166ef9d36ba73f8074886 /tests/js
parent6f29041f0910e088e0e96f77e5aae8a39edbe5c5 (diff)
downloadNim-ac63a9989289bd61542b9b50c25e57e0725383a7.tar.gz
fixes #5974
Diffstat (limited to 'tests/js')
-rw-r--r--tests/js/trefbyvar.nim13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/js/trefbyvar.nim b/tests/js/trefbyvar.nim
index 68dd36543..73ddbed9e 100644
--- a/tests/js/trefbyvar.nim
+++ b/tests/js/trefbyvar.nim
@@ -2,7 +2,8 @@ discard """
   output: '''0
 5
 0
-5'''
+5
+@[1, 2]'''
 """
 
 # bug #2476
@@ -33,3 +34,13 @@ proc main =
   echo t.m
 
 main()
+
+# bug #5974
+type
+  View* = object
+    data: ref seq[int]
+
+let a = View(data: new(seq[int]))
+a.data[] = @[1, 2]
+
+echo a.data[]