Skip to content

Commit

Permalink
fix(outcome-printer): wrap uncurried fn type arguments in parens
Browse files Browse the repository at this point in the history
  • Loading branch information
glennsl committed Jul 7, 2023
1 parent cd56969 commit cce6278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jscomp/syntax/src/res_outcome_printer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ and printOutArrowType ~uncurried typ =
let needsParens =
match typArgs with
| _ when uncurried -> true
| [(_, (Otyp_tuple _ | Otyp_arrow _))] -> true
| [(_, (Otyp_tuple _ | Otyp_arrow _ | Otyp_constr (Oide_ident "function$", [(Otyp_arrow _); _])))] -> true
(* single argument should not be wrapped *)
| [("", _)] -> false
| _ -> true
Expand Down

0 comments on commit cce6278

Please sign in to comment.