mirror of
https://github.com/nushell/nushell.git
synced 2025-04-30 16: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> |
||
---|---|---|
.. | ||
environment | ||
pipeline | ||
mod.rs | ||
repl.rs |