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

bugfix: Fix PcCollector for Scala 2 in anon-fun parameters #5841

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

jkciesluk
Copy link
Member

Anonymous function parameters with type annotation have incorrect name position on definition, so we need to handle them separately.

Closes #5840 and #5837

@filipwiech
Copy link
Contributor

If I understood it correctly, the #5837 contains a case where the cursor is positioned on the => inside the lambda. Would it make sense to add such scenario to the tests? 🙂

Anonymous function parameters with type annotation have incorrect name position on definition,
so we need to handle them separately.
@jkciesluk
Copy link
Member Author

If I understood it correctly, the #5837 contains a case where the cursor is positioned on the => inside the lambda. Would it make sense to add such scenario to the tests? 🙂

The issue was that

List(1).map {
  // position of `someVeryLongName` is at `<<>>`
  someVeryLongName<<: Int => someVer>>yLongName + 1 
}

Sure, I added the test

@jkciesluk jkciesluk requested a review from tgodzik November 20, 2023 08:34
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

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

LGTM

@jkciesluk jkciesluk merged commit 819462a into scalameta:main Nov 21, 2023
23 of 25 checks passed
@jkciesluk jkciesluk deleted the i5840 branch November 21, 2023 16:22
@jkciesluk jkciesluk linked an issue Nov 22, 2023 that may be closed by this pull request
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.

documentHighlight in map is reversed documentHighlight a for => is a bit odd
3 participants