Skip to content

REPL should work with optional braces #8762

Closed
@odersky

Description

@odersky

I want to be able to write in the REPL

scala> if true then
  print(1)
  printl2)

and get "12" printed. But right now, it prints 1 immediately.

scala> if true then                                                                                                
     |   print(1)
1

To make this work, the REPL should continue to read indented code until it encounters a line that starts further to the left, or a blank line. Otherwise put, any line that has the same or larger indendation margin as the first line after the then should be seen as a follow-on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions