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

rescript@11.0.0-alpha.3 broken formatting in uncurried mode for functions with _ placeholder args #6146

Closed
DZakh opened this issue Apr 14, 2023 · 3 comments
Labels
Milestone

Comments

@DZakh
Copy link
Contributor

DZakh commented Apr 14, 2023

Input:

let concatStrings = (string1, string2) => string1 ++ string2
let toIgnoredName = concatStrings("_", _)

Expected:

let concatStrings = (string1, string2) => string1 ++ string2
let toIgnoredName = concatStrings("_", _)

Received:

let concatStrings = (string1, string2) => string1 ++ string2
let toIgnoredName = () => concatStrings("_", _)
@cristianoc
Copy link
Collaborator

@DZakh thanks for the report.
Done here: #6148

Would you try a few more examples with that PR, see if there are no other corner cases missing?

@DZakh
Copy link
Contributor Author

DZakh commented Apr 14, 2023

Is there an instruction how to use the PR's version of the compiler?

@cristianoc
Copy link
Collaborator

Is there an instruction how to use the PR's version of the compiler?

Wait for CI to finish, and npm install the artifact.

cristianoc added a commit that referenced this issue Apr 14, 2023
* Example of broken formatting for foo(a,_) in uncurried mode.

See #6146

* Fix pretty printing.

Fixes #6148

* Fix second case.

* Update CHANGELOG.md

* Somehow roundtrip tests are not happy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants