Commit 7f7b54c8 authored by Kim Nguyễn's avatar Kim Nguyễn
Browse files

Fix printing of arrow types (the priority of the -> constructor was

not propely propagate in case the left component was a 1 element intersection or union
containing an arrow)
Note: we should not have been generating such types in the first place.
parent 3f568cc8
......@@ -2021,6 +2021,8 @@ struct
| Char c -> Chars.V.print ppf c
| Regexp r -> Format.fprintf ppf "@[[ %a ]@]" (do_print_regexp 0) r
| Atomic a -> a ppf
| Intersection { def = [ a ] }
| Union { def = [ a ] } -> Format.fprintf ppf "@[%a@]" (do_print pri) a
| Intersection a -> Format.fprintf ppf "@[%a@]" (do_print_slot ~sep:"&" 2) a
| Union a -> Format.fprintf ppf "@[%a@]" (do_print_slot ~sep:"|" 2) a
| Pair (t1,t2) ->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment