Incorrect handling of `end <id>`
See original GitHub issueCompiler version
scala-3.0.1-RC1 (https://github.com/lampepfl/dotty/commit/83acd4b9e9e7af49f3702022c0ef08209f123f29)
Minimized code
This code shouldn’t have been compiled, but it did:
class C {
}
end C
And automatic rewriting (-rewrite -no-indent
) does not delete the end
. For this code:
class C:
val foo: Int = 0
end C
After compiling with scalac -rewrite -no-indent
:
class C {
val foo: Int = 0
}
end C
Issue Analytics
- State:
- Created 2 years ago
- Comments:6
Top Results From Across the Web
Tentative Nonconfirmations (Mismatches) - E-Verify
If the information is incorrect, close the case and select the statement indicating the information was not correct. After the case is closed, ......
Read more >Form 50058 Tenant ID Management FAQs - IMS/PIC - HUD
Tenant ID Management is based on the principle that IMS/PIC will accept the suspect ... However, if the ID remains invalid, at the...
Read more >Improper Error Handling - OWASP Foundation
Improper handling of errors can introduce a variety of security problems for a web site. The most common problem is when detailed internal...
Read more >CWE-119: Improper Restriction of Operations within ... - MITRE
Check buffer boundaries if accessing the buffer in a loop and make sure there is no danger of writing past the allocated space....
Read more >ITIL incident management process: 8 steps with examples
Identify when an incident is a problem and convert the incident ticket to a problem ticket. If the incident is resolved, confirm the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sorry, I didn’t cite the reference doc for
end
: https://dotty.epfl.ch/docs/reference/other-new-features/indentation.html#the-end-markerI understand the quote merely to imply that
end
is not intended as an alternative to brace, so I think the example ought to compile.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
end
marker, I shall always recoil at the end comment:It would be especially diabolical if the rewrite not only didn’t remove the
end
marker, but put it behind a line comment after the brace.OK
but not
or
nor