diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-06-29 20:25:42 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-06-29 20:25:42 +0200 |
commit | ac63a9989289bd61542b9b50c25e57e0725383a7 (patch) | |
tree | f3148328836e0e9bdfd166ef9d36ba73f8074886 /tests/js | |
parent | 6f29041f0910e088e0e96f77e5aae8a39edbe5c5 (diff) | |
download | Nim-ac63a9989289bd61542b9b50c25e57e0725383a7.tar.gz |
fixes #5974
Diffstat (limited to 'tests/js')
-rw-r--r-- | tests/js/trefbyvar.nim | 13 |
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[] |