From 04f4e2776fd5fced899c6efaadb9bdc32f7ca7ca Mon Sep 17 00:00:00 2001 From: Cristiano Calcagno Date: Thu, 12 Dec 2024 15:01:21 +0100 Subject: [PATCH] Remove remaining "Function$" from printer. --- compiler/syntax/src/res_parens.ml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/syntax/src/res_parens.ml b/compiler/syntax/src/res_parens.ml index bd8124de0d..f8d8cc1bb5 100644 --- a/compiler/syntax/src/res_parens.ml +++ b/compiler/syntax/src/res_parens.ml @@ -241,6 +241,7 @@ let is_negative_constant constant = | _ -> false let field_expr expr = + let expr = Ast_uncurried.remove_fun expr in let opt_braces, _ = ParsetreeViewer.process_braces_attr expr in match opt_braces with | Some ({Location.loc = braces_loc}, _) -> Braced braces_loc @@ -274,11 +275,6 @@ let field_expr expr = Parenthesized | _ when ParsetreeViewer.has_await_attribute expr.pexp_attributes -> Parenthesized - | {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some expr)} - when ParsetreeViewer.is_underscore_apply_sugar expr -> - Nothing - | {pexp_desc = Pexp_construct ({txt = Lident "Function$"}, Some _)} -> - Parenthesized | _ -> Nothing) let set_field_expr_rhs expr =