Skip to content
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

Type's postfix if must be on the same line #1591

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

edemaine
Copy link
Collaborator

Require postfix if/unless in a type context to be on the same line, not a following indented line. Fixes #1590

Allowing indentation seems terribly ambiguous with implicit type arguments. This is also how postfix if already behaves in expression context: the following example fails to parse:

foo
  if condition

@edemaine edemaine merged commit 106e5da into main Nov 11, 2024
3 of 4 checks passed
@edemaine edemaine deleted the type-postfix-if-same-line branch November 11, 2024 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parse error in class method with return type and <
2 participants