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: Document highlight on named arguments #5782

Merged
merged 1 commit into from Oct 26, 2023

Conversation

jkciesluk
Copy link
Member

@jkciesluk jkciesluk commented Oct 24, 2023

For methods with multiple parameter lists and default args, the tree looks like this:
Block(List(val x&1, val x&2, ...), Apply(<<method>>, List(x&1, x&2, ...))), so we need to extract this Apply.

Also, if rhs of named argument is complex, the position is often incorrect, so we need to use include for namedArgCache

fixes to #5779

@jkciesluk jkciesluk linked an issue Oct 24, 2023 that may be closed by this pull request
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.

Looks good!

For methods with multiple parameter lists and default args, the tree looks like this:
 `Block(List(val x&1, val x&2, ...), Apply(<<method>>, List(x&1, x&2, ...)))`, so we need to extract this `Apply`.
Also, if rhs of named argument is complex, the position is often incorrect, so we need to use `include` for `namedArgCache`
@jkciesluk jkciesluk merged commit ac600e4 into scalameta:main Oct 26, 2023
23 of 24 checks passed
@jkciesluk jkciesluk deleted the i5779 branch October 26, 2023 14:59
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.

Highlight on named argument in complex method
3 participants