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
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

1 participant