New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Support for negative index in the List._reverse() method #2496
Labels
bug
Something isn't working
mojo-repo
Tag all issues with this label
mojo-stdlib
Tag for issues related to standard library
q2-2024
Comments
msaelices
added
bug
Something isn't working
mojo-repo
Tag all issues with this label
labels
May 3, 2024
Can I take a stab at this? |
Of course, go for it! Happy to review a PR. |
@vidur2 I think @msaelices already opened #2497 for this. |
Oh ok thank you |
ematejska
added
the
mojo-stdlib
Tag for issues related to standard library
label
May 7, 2024
— with
Linear
modularbot
pushed a commit
that referenced
this issue
May 16, 2024
…art)` method and out of bound validation (#39464) [External] [stdlib] Support for negative indexes in `List._reverse(start)` method and out of bound validation ## Changes * The `_reverse(start)` private method in the `collections.List` struct does not support negative indexes. * Check out-of-bound indexes in the `List._reverse()` method * Tests ## Ref Fixes #2496 --------- Co-authored-by: Manuel Saelices <[email protected]> Co-authored-by: Connor Gray <[email protected]> Closes #2520 MODULAR_ORIG_COMMIT_REV_ID: 2662cfba2e6c1a602e8fa11880f29f8add446506
lsh
pushed a commit
to lsh/mojo
that referenced
this issue
May 17, 2024
…art)` method and out of bound validation (#39464) [External] [stdlib] Support for negative indexes in `List._reverse(start)` method and out of bound validation ## Changes * The `_reverse(start)` private method in the `collections.List` struct does not support negative indexes. * Check out-of-bound indexes in the `List._reverse()` method * Tests ## Ref Fixes modularml#2496 --------- Co-authored-by: Manuel Saelices <[email protected]> Co-authored-by: Connor Gray <[email protected]> Closes modularml#2520 MODULAR_ORIG_COMMIT_REV_ID: 2662cfba2e6c1a602e8fa11880f29f8add446506 Signed-off-by: Lukas Hermann <[email protected]>
msaelices
added a commit
to msaelices/mojo
that referenced
this issue
May 18, 2024
…art)` method and out of bound validation (#39464) [External] [stdlib] Support for negative indexes in `List._reverse(start)` method and out of bound validation ## Changes * The `_reverse(start)` private method in the `collections.List` struct does not support negative indexes. * Check out-of-bound indexes in the `List._reverse()` method * Tests ## Ref Fixes modularml#2496 --------- Co-authored-by: Manuel Saelices <[email protected]> Co-authored-by: Connor Gray <[email protected]> Closes modularml#2520 MODULAR_ORIG_COMMIT_REV_ID: 2662cfba2e6c1a602e8fa11880f29f8add446506
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
mojo-repo
Tag all issues with this label
mojo-stdlib
Tag for issues related to standard library
q2-2024
Bug description
Reviewing the
collections.List
struct, I've found that the_reverse(start)
private method is not supporting negative indexesSteps to reproduce
This piece of code will not work as expected:
System information
mojo -v
modular -v
The text was updated successfully, but these errors were encountered: