Skip to content
Snippets Groups Projects
Commit 6ea537ae authored by nilfit's avatar nilfit
Browse files

add parentheses around tyes in Ddata constructors

This prevents syntax errors on star-separated lists of function types.
parent e112153a
No related branches found
No related tags found
No related merge requests found
......@@ -589,7 +589,7 @@ module Print = struct
match cs_args with
| [] -> fprintf fmt "@[<hov 4>| %a@]" (print_uident info) id
| l -> fprintf fmt "@[<hov 4>| %a of %a@]" (print_uident info) id
(print_list star (print_ty ~paren:false info)) l in
(print_list star (print_ty ~paren:true info)) l in
let print_field fmt (is_mutable, id, ty) =
fprintf fmt "%s%a: @[%a@];" (if is_mutable then "mutable " else "")
(print_lident info) id (print_ty ~paren:false info) ty in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment