Skip to content

Repl doesn't wait on incomplete assignment #13507

@CertainLach

Description

@CertainLach

Describe the bug

Previously, typing those two expressions in nix repl resulted in the same:

nix-repl> {[ENTER]
nix-repl> obj = {[ENTER]

I was able to continue typing

nix-repl> obj = {
        >    a = 1;
        > }

But d8b067b has broken it, and now only the first (non-assignment) expression wait for the output, assignment fails with an unexpected end of file error:

nix-repl> a = {  
error: syntax error, unexpected end of file, expecting INHERIT
       at «string»:1:3:
            1|  {
             |   ^

nix-repl> {
        >   a = 1;
        > }
{ a = 1; }

Metadata

Nix 2.30.1

Additional context

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions