aboutsummaryrefslogtreecommitdiff
path: root/interp
diff options
context:
space:
mode:
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 89e04b69d2..d3142e7f0c 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 ~hdr:"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