diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-12 00:50:25 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-07-12 00:50:25 +0200 |
commit | 7a018007a442c74602fc6819ff5eb30697cbbf49 (patch) | |
tree | 3bdab30c5503f21f208dea741ba9abdaae7e68cc /tests | |
parent | bcb2365decb4fce8bd0be9e8e7a855a86fbcc202 (diff) | |
download | Nim-7a018007a442c74602fc6819ff5eb30697cbbf49.tar.gz |
fixes #4471
Diffstat (limited to 'tests')
-rw-r--r-- | tests/js/tstring_assignment.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/js/tstring_assignment.nim b/tests/js/tstring_assignment.nim new file mode 100644 index 000000000..bdd93e6b5 --- /dev/null +++ b/tests/js/tstring_assignment.nim @@ -0,0 +1,11 @@ +discard """ + output: '''true''' +""" + +# bug #4471 +when true: + let s1 = "123" + var s2 = s1 + s2.setLen(0) + # fails - s1.len == 0 + echo s1.len == 3 |