Fix concat behaviour for uninitialized strings (#8950)
This commit is contained in:
parent
8670f4911b
commit
87955eaf30
2 changed files with 17 additions and 10 deletions
5
tests/js/tstrconcat.nim
Normal file
5
tests/js/tstrconcat.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
var x: string
|
||||
var y = "foo"
|
||||
add(x, y)
|
||||
y[0] = 'm'
|
||||
doAssert y == "moo" and x == "foo"
|
||||
Loading…
Add table
Add a link
Reference in a new issue