Skip to content

Row-conditions should parse {} as closure, not record - #18438

Merged
Bahex merged 1 commit into
nushell:mainfrom
Bahex:fix-where-empty-closure
Jun 19, 2026
Merged

Bahex merged 1 commit into
nushell:mainfrom
Bahex:fix-where-empty-closure

Conversation

@Bahex

@Bahex Bahex commented Jun 19, 2026

Copy link
Copy Markdown
Member

Description

While parsing row conditions, prioritize parsing possible closures before anything else.

User-facing changes (Release notes)

Empty braces ({}) as row conditions are now parsed as empty closures rather than empty records.

1..3 | where {}
  • before:
    Error: nu::parser::type_mismatch
    
      × Type mismatch.
       ╭─[repl_entry #1:1:14]
     1 │ 1..3 | where {}
       ·              ─┬
       ·               ╰── expected bool, found record
       ╰────
    
  • after:
    ╭────────────╮
    │ empty list │
    ╰────────────╯
    

Additional notes

@Bahex Bahex added A:parser Issues related to parsing notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes labels Jun 19, 2026
@Bahex
Bahex force-pushed the fix-where-empty-closure branch from 9372215 to ee6d309 Compare June 19, 2026 17:47
@Bahex
Bahex merged commit 371ff70 into nushell:main Jun 19, 2026
17 checks passed
@github-actions github-actions Bot added this to the v0.114.0 milestone Jun 19, 2026
@Bahex
Bahex deleted the fix-where-empty-closure branch July 28, 2026 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:parser Issues related to parsing notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant