Bug when assigning to vector subset
- Dominant language
- Rust
- Stars
- 145
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
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.
```r
> x <- 1:3
[1] 1 2 3
> y <- x[c(1, 1)]
[1] 1 1
> y
[1] 1 1
> y[1] <- 10
[1] 10
> y
[1] 10 10
>
```
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! 🚀
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.