mirror of
https://github.com/nushell/nushell.git
synced 2025-05-02 17:14:27 +02:00
# Description Fixes: #15510 I think it's introduced by #14653, which changes `and/or` to `match` expression. After looking into `compile_match`, it's important to collect the value before matching this. ```rust // Important to collect it first builder.push(Instruction::Collect { src_dst: match_reg }.into_spanned(match_expr.span))?; ``` This pr is going to apply the logic while compiling `and/or` operation. # User-Facing Changes The following will raise a reasonable error: ```nushell > (nu --testbin cococo false) and true Error: nu:🐚:operator_unsupported_type × The 'and' operator does not work on values of type 'string'. ╭─[entry #7:1:2] 1 │ (nu --testbin cococo false) and true · ─┬ ─┬─ · │ ╰── does not support 'string' · ╰── string ╰──── ``` # Tests + Formatting Added 1 test. # After Submitting Maybe need to update doc https://github.com/nushell/nushell.github.io/pull/1876 --------- Co-authored-by: Stefan Holderbach <sholderbach@users.noreply.github.com> |
||
---|---|---|
.. | ||
assets/nu_json | ||
const_ | ||
eval | ||
fixtures | ||
hooks | ||
modules | ||
overlays | ||
parsing | ||
path | ||
plugin_persistence | ||
plugins | ||
repl | ||
scope | ||
shell | ||
main.rs |