diff options
author | Damien Doligez <damien.doligez@inria.fr> | 2016-04-15 18:15:52 +0200 |
---|---|---|
committer | Damien Doligez <damien.doligez@inria.fr> | 2016-04-18 11:51:14 +0200 |
commit | 033ffae6b1b410a746e3804cd522ee3d63cf0b79 (patch) | |
tree | 36321139bdb204a42dfdb48a77e792a71d5a9759 | |
parent | af46c1644c728fa3b8311402dcbd88ca93bf96bc (diff) | |
download | ocaml-033ffae6b1b410a746e3804cd522ee3d63cf0b79.tar.gz |
PR#6906: wrong error location for unmatched paren with #use in toplevel
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | parsing/location.ml | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -531,6 +531,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) @@ -1,4 +1,4 @@ -4.04.0+dev0-2016-02-18 +4.04.0+dev1-2016-04-18 # The version string is the first line of this file. # It must be in the format described in stdlib/sys.mli diff --git a/parsing/location.ml b/parsing/location.ml index 2a4badc05e..65e9fa7cb3 100644 --- a/parsing/location.ml +++ b/parsing/location.ml @@ -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; _} = List.fold_left collect_locs (loc :: locs) sub in |