aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-04-05 13:07:19 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-04-05 13:11:24 +0200
commitc6f24b1cbfb485dbf14b3934208c113140de2eca (patch)
tree4799a5ad22953cdfce47347d9665723d17824ae3 /interp
parent57c673d0aa411facc2fc8fa222e7653041b282ea (diff)
Fixing #5454 (an assert false with 'pat).
Note: Apparently not easy to make a test file as the error is raised in "G_vernac.fresh_var" at parsing time (not captured by Fail).
Diffstat (limited to 'interp')
-rw-r--r--interp/topconstr.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/interp/topconstr.ml b/interp/topconstr.ml
index a397ca82e..bf0ce60d8 100644
--- a/interp/topconstr.ml
+++ b/interp/topconstr.ml
@@ -58,7 +58,9 @@ let rec cases_pattern_fold_names f a = function
| CPatDelimiters (_,_,pat) -> cases_pattern_fold_names f a pat
| CPatAtom (_,Some (Ident (_,id))) when not (is_constructor id) -> f id a
| CPatPrim _ | CPatAtom _ -> a
- | CPatCast _ -> assert false
+ | CPatCast (loc,_,_) ->
+ CErrors.user_err_loc (loc, "cases_pattern_fold_names",
+ Pp.strbrk "Casts are not supported here.")
let ids_of_pattern =
cases_pattern_fold_names Id.Set.add Id.Set.empty