aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Tassi2019-07-24 16:34:42 +0200
committerEnrico Tassi2019-07-24 16:34:42 +0200
commit3823ace92d92b2f5ee697ff156fe72d55217a921 (patch)
tree4f164d4fa6ef3fe9cd18b9ad450cb301eebd74d6
parent85236f0c82a01c5b6c4b434b11b802ef3e392f33 (diff)
parent2727af30f9338830c2b225587f87ed8a4e80f7e3 (diff)
Merge PR #10536: Fix #10533: uncaught Invalid_argument Array.fold_left2 in rewrite
Reviewed-by: gares Reviewed-by: ppedrot
-rw-r--r--pretyping/unification.ml5
-rw-r--r--test-suite/bugs/closed/bug_10533.v8
2 files changed, 11 insertions, 2 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml
index 00831b5962..a9eb43e573 100644
--- a/pretyping/unification.ml
+++ b/pretyping/unification.ml
@@ -839,8 +839,9 @@ let rec unify_0_with_initial_metas (sigma,ms,es as subst : subst0) conv_at_top e
unify_app_pattern true curenvnb pb opt substn cM f1 l1 cN f2 l2
| _ -> raise ex)
- | Case (_,p1,c1,cl1), Case (_,p2,c2,cl2) ->
- (try
+ | Case (ci1,p1,c1,cl1), Case (ci2,p2,c2,cl2) ->
+ (try
+ if not (eq_ind ci1.ci_ind ci2.ci_ind) then error_cannot_unify curenv sigma (cM,cN);
let opt' = {opt with at_top = true; with_types = false} in
Array.fold_left2 (unirec_rec curenvnb CONV {opt with at_top = true})
(unirec_rec curenvnb CONV opt'
diff --git a/test-suite/bugs/closed/bug_10533.v b/test-suite/bugs/closed/bug_10533.v
new file mode 100644
index 0000000000..e72957bdee
--- /dev/null
+++ b/test-suite/bugs/closed/bug_10533.v
@@ -0,0 +1,8 @@
+
+Require Import Eqdep Setoid.
+Goal forall (t : unit) (pf : tt = t),
+ if (match pf with eq_refl => false end) then True else False.
+Proof.
+ intros.
+ try setoid_rewrite <-Eqdep.Eq_rect_eq.eq_rect_eq.
+Abort.