Skip to content

Commit 04f4e27

Browse files
committed
Remove remaining "Function$" from printer.
1 parent a5f002d commit 04f4e27

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

compiler/syntax/src/res_parens.ml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ let is_negative_constant constant =
241241
| _ -> false
242242

243243
let field_expr expr =
244+
let expr = Ast_uncurried.remove_fun expr in
244245
let opt_braces, _ = ParsetreeViewer.process_braces_attr expr in
245246
match opt_braces with
246247
| Some ({Location.loc = braces_loc}, _) -> Braced braces_loc
@@ -274,11 +275,6 @@ let field_expr expr =
274275
Parenthesized
275276
| _ when ParsetreeViewer.has_await_attribute expr.pexp_attributes ->
276277
Parenthesized
277-
| {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some expr)}
278-
when ParsetreeViewer.is_underscore_apply_sugar expr ->
279-
Nothing
280-
| {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some _)} ->
281-
Parenthesized
282278
| _ -> Nothing)
283279

284280
let set_field_expr_rhs expr =

0 commit comments

Comments
 (0)