rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

Parentheses incorrectly removed by printer, leading to wrong application of `@uncurry`

Open cknitt opened this issue 1 year ago • 2 comments

Example from rescript-webapi:

@val external queueMicrotask: (@uncurry (unit => unit)) => unit = "queueMicrotask"

is reformatted to

@val external queueMicrotask: (@uncurry unit => unit) => unit = "queueMicrotask"

which applies @uncurry incorrectly (giving an "unused attribute" warning in v12/master after I fixed the unused attribute checks in #6643).

cknitt avatar May 26 '24 17:05 cknitt

(in uncurried mode only)

cknitt avatar May 27 '24 07:05 cknitt

This is similar to https://github.com/rescript-lang/rescript-compiler/issues/6638

shulhi avatar Aug 16 '24 10:08 shulhi