-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fewerBraces allows empty indentation region #13097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The reason why it's parsed correctly is that It seems that it having So expectation is: val x = List(42).foreach: // error |
to add a REPL test that uses a custom compiler flag, it seems we could either:
whatevs, either way UPDATE: oh, but I tried the latter path and it didn't work ("Illegal start of statement"); apparently |
We looked at this in the spree today. (We = me, @griggt, @gagandeepkalra, @jirid) but only got partway into it. @gagandeepkalra has a wip branch with some tests and a stab at a patch, but it's still very wippy — we don't think we have the right fix yet. |
As originally noted by Scala book author @cayhorstmann on gitter, the fewer braces variant is circulating in the population.
Compiler version
3.0.3-RC1
Minimized code
Output
It's not so much the output as the input. I hope REPL would wait for more.
The compiler allows empty indentation:
Expectation
The
def f
with empty indentation requires eitherend f
oreof
. Expect it to require a block expr and not happily eta-expand.In REPL, it should work like
class C:
.Spec requires a touch-up for the ArgExpr, but feature is still behind a flag.
The text was updated successfully, but these errors were encountered: