Skip to content

Conversation

@som-snytt
Copy link
Contributor

Fixes #24496

@som-snytt
Copy link
Contributor Author

In the spirit of, "People will try it":

  val one = list
        .collect: case x =>
          (x, x + 1)
        .toMap

Maybe it's enough to detect arrow at EOL. (Edit: "People will already have used it.")

Edit: actually, the SIP isn't very plain on this point, but the PR includes a test that case expr is multiline.

This is OK:

  val two = list
        .collect: x => (x, x + 1)
          .toMap

There is no misalignment warning.

@som-snytt
Copy link
Contributor Author

Closing to verify which behavior is wanted.

@som-snytt som-snytt closed this Nov 21, 2025
@odersky odersky reopened this Nov 22, 2025
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is the right behavior

@som-snytt
Copy link
Contributor Author

In that case, I'll follow up with tests etc etc.

@som-snytt som-snytt marked this pull request as ready for review November 23, 2025 12:20
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.

Invalid parsing of partial function under relaxedLambdaSyntax

2 participants