PR#6906: wrong error location for unmatched paren with #use in toplevel

master
Damien Doligez 2016-04-15 18:15:52 +02:00
parent 932cc8ed4c
commit f2e1274e37
3 changed files with 5 additions and 2 deletions

View File

@ -469,6 +469,9 @@ Toplevel and debugger:
(whitequark and Jake Donham,
review by Gabriel Scherer and Jacques-Henri Jourdan)
- PR#6906: wrong error location for unmatched paren with #use in toplevel
(Damien Doligez, report by Kenichi Asai)
- PR#6935, GPR#298: crash in debugger when load_printer is given a directory
(Junsong Li, review by Gabriel Scherer)

View File

@ -1,4 +1,4 @@
4.03.0+dev18-2016-04-01
4.03.0+dev19-2016-04-15
# The version string is the first line of this file.
# It must be in the format described in stdlib/sys.mli

View File

@ -389,7 +389,7 @@ let error_of_exn exn =
let rec default_error_reporter ppf ({loc; msg; sub; if_highlight} as err) =
let highlighted =
if if_highlight <> "" then
if if_highlight <> "" && loc.loc_start.pos_fname = "//toplevel//" then
let rec collect_locs locs {loc; sub; if_highlight; _} =
List.fold_left collect_locs (loc :: locs) sub
in