diff options
-rw-r--r-- | typing/printtyp.ml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/typing/printtyp.ml b/typing/printtyp.ml index f815e96fb..9d3e83bf4 100644 --- a/typing/printtyp.ml +++ b/typing/printtyp.ml @@ -731,9 +731,11 @@ let report_unification_error ppf tr txt1 txt2 = let trace fst txt ppf tr = print_labels := not !Clflags.classic; - try - trace fst txt ppf (filter_trace tr); - print_labels := true + try match tr with + t1 :: t2 :: tr -> + trace fst txt ppf (t1 :: t2 :: filter_trace tr); + print_labels := true + | _ -> () with exn -> print_labels := true; raise exn |