JS codegen - strings are assigned by reference #4471

Closed
nigredo-tori opened this Issue Jul 10, 2016 · 0 comments

Projects

None yet

2 participants

@nigredo-tori
Contributor

In JS strings are not copied properly. Example:

let s1 = "123"
var s2 = s1
s2.setLen(0)
# fails - s1.len == 0
assert s1.len == 4
@nigredo-tori nigredo-tori added a commit to nigredo-tori/Nim that referenced this issue Jul 10, 2016
@nigredo-tori nigredo-tori pegs - workaround for #4471 7a64e1b
@dom96 dom96 added the JS label Jul 10, 2016
@Araq Araq added a commit that closed this issue Jul 11, 2016
@Araq Araq fixes #4471 7a01800
@Araq Araq closed this in 7a01800 Jul 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment