Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix #8256: Disallow silent indent for template bodies #8264
The actual change are just two lines, one in Parser the other in Config. But a lot of tests and infrastructure code had already switched to the shorthand, even though it was "officially" supported for only one release window, which was some months back. I guess that's natural, there's a strong tendency to pick the shortest form available.
I don't think so. We have for each statement sequence an indentation width, which is the indentation of the first statement in the sequence. Following statements can be on the right of that width. That's what happened here: The trait was indented too far to the right, and the folllowing statement was interpreted as indented as well, but now indented relative to the trait because it was to the right of the previous indentation width. With an explicit
val a = ??? trait T: val x = 1
Here, again the definition of