Open sebffischer opened 7 months ago
I believe that this is not exactly the same bug as https://github.com/dgkf/R/issues/104, so I am opening a separate issue for it (I might be wrong though).
I think these will be the same issue, but I'm happy to have it documented as a separate use case.
I think it's similar because y
will be pointing to the same data as x
with subset [1, 1]
. Assigning to y
right now mutates x
at position 1
without creating a unique vector.
Once we fix the subset assignment so that it creates a distinct vector upon mutation, then I think this will be resolved.
PS: Because it feels a little bad that I comment so much on the bugs, I just want to stress that it is amazing how much already does work! 🚀
Seriously, do not worry about it at all! Your continued bug reports are evidence that you're invested in the project. Itemizing issues is a lot of work - it's a privilege to have you studiously reporting these things. 🙏
I believe that this is not exactly the same bug as https://github.com/dgkf/R/issues/104, so I am opening a separate issue for it (I might be wrong though). The problem arises when we have a vector subset, where different elements of the subset point to the same elements from the actual vector. I think the culprit are these lines: https://github.com/dgkf/R/blob/c9b14803ccff7075d9651d7376651abce5a10889/src/object/vector/rep.rs#L112.
PS: Because it feels a little bad that I comment so much on the bugs, I just want to stress that it is amazing how much already does work! 🚀