-
Notifications
You must be signed in to change notification settings - Fork 2.1k
} gives strange error #8400
Copy link
Copy link
Closed
Labels
A:error-unhelpfulThe error message you observe is not helpful to identify the problemThe error message you observe is not helpful to identify the problemcategory:bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Milestone
Description
Describe the bug
~/Source/nushell〉 }
Error: nu::parser::unbalanced_delimiter
× Unbalanced delimiter.
╭─[entry #3:1:1]
1 │ )
╰────
note: that error line is the previous thing I typed into the repl.
How to reproduce
- Either start by typing
}and hit enter. Or...
Type a few lines first, then:
2. Type } and hit enter
Expected behavior
I'd expect to underline the actual }. Right now it seems like it's trying to underline the point before it, which is going to be whatever the last buffer in the REPL was.
This doesn't seem to be a Span::new(0, 0) related issue, but one that has to do with not having a correct span when lexing a } by itself.
Screenshots
No response
Configuration
| key | value |
|---|---|
| version | 0.76.1 |
| branch | main |
| commit_hash | 0e21678 |
| build_os | macos-aarch64 |
| build_target | aarch64-apple-darwin |
| rust_version | rustc 1.66.1 (90743e729 2023-01-10) |
| rust_channel | 1.66.1-aarch64-apple-darwin |
| cargo_version | cargo 1.66.1 (ad779e08b 2023-01-10) |
| build_time | 2023-03-08 06:56:59 +13:00 |
| build_rust_channel | debug |
| features | default, zip |
| installed_plugins |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:error-unhelpfulThe error message you observe is not helpful to identify the problemThe error message you observe is not helpful to identify the problemcategory:bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers