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 =
167
167
| _ -> false
168
168
169
169
let flatten_operand_rhs parent_operator rhs =
170
+ let rhs = Ast_uncurried. remove_fun rhs in
170
171
match rhs.Parsetree. pexp_desc with
171
172
| Parsetree. Pexp_apply
172
173
( {
@@ -179,10 +180,8 @@ let flatten_operand_rhs parent_operator rhs =
179
180
let prec_parent = ParsetreeViewer. operator_precedence parent_operator in
180
181
let prec_child = ParsetreeViewer. operator_precedence operator in
181
182
prec_parent > = prec_child || rhs.pexp_attributes <> []
182
- | Pexp_construct ({txt = Lident "Function$" } , Some _ ) -> true
183
183
| Pexp_constraint ({pexp_desc = Pexp_pack _ } , {ptyp_desc = Ptyp_package _ } ) ->
184
184
false
185
- | Pexp_fun _ when ParsetreeViewer. is_underscore_apply_sugar rhs -> false
186
185
| Pexp_fun _ | Pexp_newtype _ | Pexp_setfield _ | Pexp_constraint _ -> true
187
186
| _ when ParsetreeViewer. is_ternary_expr rhs -> true
188
187
| _ -> false
You can’t perform that action at this time.
0 commit comments