-
Notifications
You must be signed in to change notification settings - Fork 2.1k
parser panicked with index out of bounds #8385
Copy link
Copy link
Closed
Labels
A:parserIssues related to parsingIssues related to parsingcategory:bugSomething isn't workingSomething isn't workingpanic
Milestone
Description
Describe the bug
I created a function with a signature that would lead to the parser panicking when I tried to type out specific ways of calling the function.
thread 'main' panicked at 'index out of bounds: the len is 2 but the index is 3', crates/nu-parser/src/parser.rs:752:28
How to reproduce
def nuu [ one: list two: list three: list four: list five: list six: list ] { }nuu [] [] [] [] [] [] # trying to type out this call would lead to a panic!nuu 0 0 0 0 # trying to type out this call would lead to a panic!nuu 00 00 00 00 00 # trying to type out this call would lead to a panic!
Expected behavior
I expected nu to not panci!
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.76.0 |
| branch | |
| commit_hash | bc38a6a |
| build_os | linux-x86_64 |
| build_target | x86_64-unknown-linux-gnu |
| rust_version | rustc 1.66.1 (90743e729 2023-01-10) |
| rust_channel | 1.66.1-x86_64-unknown-linux-gnu |
| cargo_version | cargo 1.66.1 (ad779e08b 2023-01-10) |
| pkg_version | 0.76.0 |
| build_time | 2023-02-21 21:13:21 +00:00 |
| build_rust_channel | release |
| features | database, default, trash, which, zip |
| installed_plugins |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:parserIssues related to parsingIssues related to parsingcategory:bugSomething isn't workingSomething isn't workingpanic