aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorMaxime Dénès2018-09-03 12:29:20 +0200
committerMaxime Dénès2018-09-03 12:29:20 +0200
commit7456164386a87df83763109e12fa8aaa71a96104 (patch)
treed52aeec900c8cfef4fbf64a1e7750f80c8b0348e /plugins
parent03f93662a255a00a9068ef8963ab221cc62f5cfd (diff)
parentcd3040d5bb67bd17a3c4d20e3324d285657e215d (diff)
Merge PR #8147: [ssr] assertion -> error message (Fix #8134)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ssr/ssripats.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/ssr/ssripats.ml b/plugins/ssr/ssripats.ml
index 46fde41150..1dbacf0ff7 100644
--- a/plugins/ssr/ssripats.ml
+++ b/plugins/ssr/ssripats.ml
@@ -379,8 +379,9 @@ let elim_intro_tac ipats ?ist what eqid ssrelim is_rec clr =
let ctx, last = EConstr.decompose_prod_assum sigma concl in
let args = match EConstr.kind_of_type sigma last with
| Term.AtomicType (hd, args) ->
- assert(Ssrcommon.is_protect hd env sigma);
- args
+ if Ssrcommon.is_protect hd env sigma then args
+ else Ssrcommon.errorstrm
+ (Pp.str "Too many names in intro pattern")
| _ -> assert false in
let case = args.(Array.length args-1) in
if not(EConstr.Vars.closed0 sigma case)