You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and get "12" printed. But right now, it prints 1 immediately.
scala>iftruethen| 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.
The text was updated successfully, but these errors were encountered:
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Apr 22, 2020
This is great even if we do not use optional braces. For instance, now you can write:
```scala
scala> if c == 1 then
"yes"
else
"no"
```
Previously, it would have stopped you after the "yes".
This is great even if we do not use optional braces. For instance, now you can write:
```scala
scala> if c == 1 then
"yes"
else
"no"
```
Previously, it would have stopped you after the "yes".
I want to be able to write in the REPL
and get "12" printed. But right now, it prints
1
immediately.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.The text was updated successfully, but these errors were encountered: