-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Comma in extends
or derives
clause treated as parameter separator in indentation blocks
#22527
Comments
The useful outdent supports (from the unit test)
The syntax does not distinguish "term commas" from "type commas". Similar
|
The provisional proposal is to require the comma at EOL if the indent has a colon prefix. So the example would have to be written:
That preserves the comma and the spirit of indents in parens. Certain other tokens work similarly:
|
I marked the PR ready for review, to mean discussion. It is dialed back to only consider colon (as prefix of indented region) for the "comma at EOL" tweak. The PR shows examples of misleading indentation after Added a test to show that "arrow eol" is not equivalent to "colon eol" with parameter on next line:
as opposed to
but it is agnostic about the indentation of the arg to f:
which is the same as
The arg to k must be indented wrt g not k (3.6.3):
|
Compiler version
3.3.5
3.6.3
3.6.4-RC1
Minimized code
Output
Expectation
With braces, this code compiles:
The text was updated successfully, but these errors were encountered: