aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2016-10-29 14:18:43 +0200
committerHugo Herbelin2016-10-29 14:40:55 +0200
commit0827cf4c6de1df1ab5cdb457c2ca8de6001427f4 (patch)
treee5d8ae754e5b55d3422fb0b726e9d15293bdb57d
parenta4458475187de726b1518e536cb1a42e8c9d0534 (diff)
Fixing error localisation bug introduced in fixing #5142 (21e1d501e17c).
(May it fell in the case mentioned in the inner comment of Exninfo.info?)
-rw-r--r--pretyping/cases.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/pretyping/cases.ml b/pretyping/cases.ml
index 5c9ce2624c..aa24733d9f 100644
--- a/pretyping/cases.ml
+++ b/pretyping/cases.ml
@@ -64,10 +64,11 @@ let error_wrong_numarg_inductive_loc loc env c n =
let list_try_compile f l =
let rec aux errors = function
- | [] -> if errors = [] then anomaly (str "try_find_f") else raise (List.last errors)
+ | [] -> if errors = [] then anomaly (str "try_find_f") else iraise (List.last errors)
| h::t ->
try f h
with UserError _ | TypeError _ | PretypeError _ | PatternMatchingError _ as e ->
+ let e = CErrors.push e in
aux (e::errors) t in
aux [] l