Skip to content

Commit

Permalink
Fix error submessages in the toplevel: do not display dummy locations
Browse files Browse the repository at this point in the history
  • Loading branch information
Armaël Guéneau committed Sep 19, 2019
1 parent f56b59d commit 636d542
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion parsing/location.ml
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,8 @@ let terminfo_toplevel_printer (lb: lexbuf): report_printer =
in
let pp_main_loc _ _ _ _ = () in
let pp_submsg_loc _ _ ppf loc =
Format.fprintf ppf "%a:@ " print_loc loc in
if not loc.loc_ghost then
Format.fprintf ppf "%a:@ " print_loc loc in
{ batch_mode_printer with pp; pp_main_loc; pp_submsg_loc }

let best_toplevel_printer () =
Expand Down

0 comments on commit 636d542

Please sign in to comment.