fixes #4471
This commit is contained in:
parent
bcb2365dec
commit
7a018007a4
2 changed files with 26 additions and 3 deletions
11
tests/js/tstring_assignment.nim
Normal file
11
tests/js/tstring_assignment.nim
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue