- Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve indent handling in parens #22530
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
base: main
Are you sure you want to change the base?
Conversation
| That breaks sudoku! which is hard to read and misleading indentation, but is it illegal. The intuition here would be that if you indent the body of your function literal, you intend it to look like a block, and not mashed together with trailing args. Restricting the restriction to Maybe that is OK, because the colon is special. I noticed that we wanted templates defined with |
dceeef7 to 4362c32 Compare | That breaks scalaz! where it looks like |
4362c32 to 17d360e Compare | The spurious timeout. |
b20e6a2 to dc46f94 Compare |
That blocks other corpus tests. Probably it is too opinionated, but I'll try unblocking just to collect the data. |
dc46f94 to b4a4319 Compare d194a49 to 90f6cea Compare | Rebased only. Not sure if anyone has an opinionated opinion about this syntax niche, whether it's better to support it or defund it. |
| I verified that tests passed in February commit so now I have the pleasant task of finding out what changed since winter. Edit: yes it was me. The fix to infer indent after old-style conditional means it can't be combined with the current tweak, which is just as well. Worth adding that it took me a while to realize that the test was using old-style syntax; in fact, old and new side-by-side. |
0f7460d to 82f2d3d Compare | This unimproved error is def g: Unit = identity( x = class X extends AnyRef, Serializable // error 27 // error )that is |
82f2d3d to 2796587 Compare 2796587 to 456a6ab Compare
For outdent in parens, comma must be at end of line if the indented region was introduced by a colon.
In a named arg in a pattern, ignore indentation after
=.Fixes #22527
Fixes #24474