Skip to content

Fix issue with formatting comment on labelled argument in uncurried mode #6169

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

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

cristianoc
Copy link
Collaborator

Fixes #6094

@cristianoc
Copy link
Collaborator Author

cristianoc commented Apr 17, 2023

It was initially unclear why the fix was needed in the previous implementation. The issue occurred when the uncurried transformation wrapped the function with Function$ using the same location as the function itself, which seemed to interfere with the comment logic that processes the parse tree.

The current fix assigns a ghost location to Function$. This should not cause any issues, as long as type errors or other issues silently pass by it. However, if there are any real errors related to Function$ in the future, such as an accidental name change, the resulting error will not have a location.

@cristianoc cristianoc merged commit 2db6f9b into master Apr 17, 2023
@cristianoc cristianoc deleted the comment-uncurried-fun branch April 17, 2023 01:26
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.

Regression: comment on labeled argument formatted away
1 participant