File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ let rhs_binary_expr_operand parent_operator rhs =
167167 | _ -> false
168168
169169let flatten_operand_rhs parent_operator rhs =
170+ let rhs = Ast_uncurried. remove_fun rhs in
170171 match rhs.Parsetree. pexp_desc with
171172 | Parsetree. Pexp_apply
172173 ( {
@@ -179,10 +180,8 @@ let flatten_operand_rhs parent_operator rhs =
179180 let prec_parent = ParsetreeViewer. operator_precedence parent_operator in
180181 let prec_child = ParsetreeViewer. operator_precedence operator in
181182 prec_parent > = prec_child || rhs.pexp_attributes <> []
182- | Pexp_construct ({txt = Lident "Function$" } , Some _ ) -> true
183183 | Pexp_constraint ({pexp_desc = Pexp_pack _ } , {ptyp_desc = Ptyp_package _ } ) ->
184184 false
185- | Pexp_fun _ when ParsetreeViewer. is_underscore_apply_sugar rhs -> false
186185 | Pexp_fun _ | Pexp_newtype _ | Pexp_setfield _ | Pexp_constraint _ -> true
187186 | _ when ParsetreeViewer. is_ternary_expr rhs -> true
188187 | _ -> false
You can’t perform that action at this time.
0 commit comments