Open Julow opened 9 months ago
Describe the bug
Parentheses around types with attributes can be skipped in some cases. Spotted in https://github.com/ocaml-ppx/ocamlformat/pull/2519
let _ : (foo[@attr]) = ()
Ideally, Ast.parenze_typ would take attributes into account and fmt_core_type wouldn't apply parentheses unconditionally.
Ast.parenze_typ
fmt_core_type
Describe the bug
Parentheses around types with attributes can be skipped in some cases. Spotted in https://github.com/ocaml-ppx/ocamlformat/pull/2519
Ideally,
Ast.parenze_typ
would take attributes into account andfmt_core_type
wouldn't apply parentheses unconditionally.