File tree 4 files changed +15
-0
lines changed
4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 13
13
# 11.1.4
14
14
15
15
- Fix issue where long layout break added a trailing comma in partial application ` ... ` . https://github.com/rescript-lang/rescript-compiler/pull/6949
16
+ - Fix incorrect format of function under unary operator. https://github.com/rescript-lang/rescript-compiler/pull/6953
16
17
17
18
# 11.1.3
18
19
Original file line number Diff line number Diff line change @@ -111,6 +111,11 @@ let unaryExprOperand expr =
111
111
Parenthesized
112
112
| _ when ParsetreeViewer. hasAwaitAttribute expr.pexp_attributes ->
113
113
Parenthesized
114
+ | {pexp_desc = Pexp_construct ({txt = Lident " Function$" }, Some expr)}
115
+ when ParsetreeViewer. isUnderscoreApplySugar expr ->
116
+ Nothing
117
+ | {pexp_desc = Pexp_construct ({txt = Lident "Function$" } , Some _ )} ->
118
+ Parenthesized
114
119
| _ -> Nothing )
115
120
116
121
let binaryExprOperand ~isLhs expr =
@@ -276,6 +281,11 @@ let fieldExpr expr =
276
281
Parenthesized
277
282
| _ when ParsetreeViewer. hasAwaitAttribute expr.pexp_attributes ->
278
283
Parenthesized
284
+ | {pexp_desc = Pexp_construct ({txt = Lident " Function$" }, Some expr)}
285
+ when ParsetreeViewer. isUnderscoreApplySugar expr ->
286
+ Nothing
287
+ | {pexp_desc = Pexp_construct ({txt = Lident "Function$" } , Some _ )} ->
288
+ Parenthesized
279
289
| _ -> Nothing )
280
290
281
291
let setFieldExprRhs expr =
Original file line number Diff line number Diff line change @@ -85,3 +85,5 @@ let () = {
85
85
86
86
let x = (!truths)[0]
87
87
(!streets)[0] = "foo-street"
88
+
89
+ !(arg => doStuffWith(arg))
Original file line number Diff line number Diff line change @@ -68,3 +68,5 @@ let () = {
68
68
69
69
let x = (! truths )[0 ]
70
70
(! streets )[0 ] = "foo-street"
71
+
72
+ ! (arg => doStuffWith (arg ))
You can’t perform that action at this time.
0 commit comments