mirror of
https://github.com/nushell/nushell.git
synced 2026-12-02 18:24:08 +08:00
## Description `parse_math_expression` passed the pipeline input type when parsing the left-hand side, but parsed the right-hand side without it. As a result, an incompatible expression such as `"x" + $in` inside a command with typed pipeline input was accepted by the parser and only failed at runtime, while the equivalent `$in + "x"` expression produced a parse-time type error. This change passes the same pipeline input type to the right-hand side and adds a regression test alongside the existing `$in` type-checking tests. ## User-facing changes (Release notes) Nushell now reports incompatible right-hand-side uses of `$in` in typed math expressions during parsing, matching the existing behavior for the left-hand side. ## Additional notes Fixes #18682 Local verification: - `cargo fmt --all -- --check` - focused RHS pipeline input regression - closure input-type isolation regressions - block RHS pipeline input regression - complete type-checking test module: 55 passed - `nu-parser` tests: 302 passed, 2 ignored - strict Clippy with default features Signed-off-by: Daniel Castrillon <daniel.ca.pe207@gmail.com>