You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When resetting an entire var array using the values in the original array and then using [] to access the elements, some of the old values are still there.
Example
var a = [1, 2, 3, 4, 5]
echo a
echo [a[2], a[3], a[0], a[1], a[4]]
a = [a[2], a[3], a[0], a[1], a[4]]
echo a
Current Output
[1, 2, 3, 4, 5]
[3, 4, 1, 2, 5]
[3, 4, 3, 4, 5]
Expected Output
[1, 2, 3, 4, 5]
[3, 4, 1, 2, 5]
[3, 4, 1, 2, 5]
Possible Solution
🤷♂️ Possibly some optimization issue
Additional Information
Doesn't work from the current devel build all the way back until 0.18.x. Before that, there is some issue with array constructors that I am not familiar with and therefore couldn't test
I tested on latest back until 0.18.x on play.nim-lang.org and 1.5.1 with choosenim on my local machine (Mac OSX)
The text was updated successfully, but these errors were encountered:
When resetting an entire
var array
using the values in the original array and then using[]
to access the elements, some of the old values are still there.Example
Current Output
Expected Output
Possible Solution
🤷♂️ Possibly some optimization issue
Additional Information
Doesn't work from the current
devel
build all the way back until 0.18.x. Before that, there is some issue with array constructors that I am not familiar with and therefore couldn't testI tested on
latest
back until 0.18.x on play.nim-lang.org and 1.5.1 with choosenim on my local machine (Mac OSX)The text was updated successfully, but these errors were encountered: