nushell/crates/nu-engine/src/compile
132ikl 553c951a60
Fix match running closures as block (#15032)
# Description
This PR makes `match` no longer run closures as if they were blocks.
This also allows returning closures from `match` without needing to wrap
in an outer subexpression or block.

Before PR:
```nushell
match 1 { _ => {|| print hi} }
# => hi
```

After PR:
```nushell
match 1 { _ => {|| print hi} }
# => closure_1090
```

# User-Facing Changes

* `match` no longer runs closures as if they were blocks

# Tests + Formatting

N/A

# After Submitting

N/A
2025-02-11 10:35:23 +01:00
..
builder.rs Change how and and or operations are compiled to IR to support custom values (#14653) 2024-12-25 06:12:53 -06:00
call.rs Change help commands to use name from scope instead of the name from the declaration (#14490) 2024-12-10 09:27:30 -06:00
expression.rs Fix try not working with let, etc. (#13885) 2024-09-23 06:44:25 -05:00
keyword.rs Fix match running closures as block (#15032) 2025-02-11 10:35:23 +01:00
mod.rs Make SpanId and RegId also use new ID struct (#13963) 2024-10-01 13:23:27 +02:00
operator.rs Run ENV_CONVERSIONS whenever it's modified (#14591) 2024-12-25 21:37:24 +08:00
redirect.rs Fix try printing when it is not the last pipeline element (#13992) 2024-10-12 14:37:10 +08:00