Skip to content

make better error message for not operator#10507

Merged
sholderbach merged 1 commit intonushell:mainfrom
WindSoilder:not_op
Sep 26, 2023
Merged

make better error message for not operator#10507
sholderbach merged 1 commit intonushell:mainfrom
WindSoilder:not_op

Conversation

@WindSoilder
Copy link
Copy Markdown
Contributor

Fixes: #10476

After the change, the error message will be something like this:

 not null
Error: nu::shell::type_mismatch

  × Type mismatch.
   ╭─[entry #11:1:1]
 1  not null
   ·     ──┬─
   ·       ╰── expected bool, found nothing
   ╰────

Copy link
Copy Markdown
Member

@sholderbach sholderbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!
Reminds me that we should get to polishing the ShellError and ParseError variants. Pretty useless TypeMismatch out of the box.

@sholderbach sholderbach merged commit d2f513d into nushell:main Sep 26, 2023
@WindSoilder WindSoilder deleted the not_op branch October 26, 2023 08:31
hardfau1t pushed a commit to hardfau1t/nushell that referenced this pull request Dec 14, 2023
Fixes: nushell#10476

After the change, the error message will be something like this:
```nushell
❯ not null
Error: nu::shell::type_mismatch

  × Type mismatch.
   ╭─[entry nushell#11:1:1]
 1 │ not null
   ·     ──┬─
   ·       ╰── expected bool, found nothing
   ╰────
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mismatched type with unset bool flags

2 participants