mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-23 07:45:23 +00:00
fixes #4471
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user