summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez@inria.fr>2016-04-15 18:15:52 +0200
committerDamien Doligez <damien.doligez@inria.fr>2016-04-18 11:51:14 +0200
commit033ffae6b1b410a746e3804cd522ee3d63cf0b79 (patch)
tree36321139bdb204a42dfdb48a77e792a71d5a9759
parentaf46c1644c728fa3b8311402dcbd88ca93bf96bc (diff)
downloadocaml-033ffae6b1b410a746e3804cd522ee3d63cf0b79.tar.gz
PR#6906: wrong error location for unmatched paren with #use in toplevel
-rw-r--r--Changes3
-rw-r--r--VERSION2
-rw-r--r--parsing/location.ml2
3 files changed, 5 insertions, 2 deletions
diff --git a/Changes b/Changes
index 465a28f232..0a8eebb32d 100644
--- a/Changes
+++ b/Changes
@@ -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)
diff --git a/VERSION b/VERSION
index 9ca1aff0c5..e374e54c31 100644
--- a/VERSION
+++ b/VERSION
@@ -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