-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Incorrect handling of end <id>
#12340
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
Braces and
I don't have an opinion about behavior under |
@som-snytt most of modern editor should be able to help you find the information about what region is closed, and fold it. |
@tisonkun It is difficult to balance how much information the source code carries and how much information the editor should display. Personally, I prefer using |
Sorry, I didn't cite the reference doc for I understand the quote merely to imply that I agree there are varying preferences about the syntax. However, the greatest passions are reserved for comments, and while I am now a satisfied user of the
It would be especially diabolical if the rewrite not only didn't remove the |
Actually the bug is that empty template is not patched:
or equivalently, empty template with colon must be disallowed. Source must compile if (optional) end marker is deleted. |
OK
but not
or
nor
|
This was fixed to make it a code comment in #12954 but PR was not linked.
is obviously no longer the case. |
Compiler version
scala-3.0.1-RC1 (83acd4b)
Minimized code
This code shouldn't have been compiled, but it did:
And automatic rewriting (
-rewrite -no-indent
) does not delete theend
. For this code:After compiling with
scalac -rewrite -no-indent
:The text was updated successfully, but these errors were encountered: