diff options
| author | Gaëtan Gilbert | 2019-07-19 12:59:13 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2019-07-19 12:59:13 +0200 |
| commit | 2727af30f9338830c2b225587f87ed8a4e80f7e3 (patch) | |
| tree | 673e19d4db0f004d333db4adaf0fbea05e76a476 /pretyping | |
| parent | fc2cb2c7d483302b908abf821d63e82f28a57570 (diff) | |
Fix #10533: uncaught Invalid_argument Array.fold_left2 in rewrite
Diffstat (limited to 'pretyping')
| -rw-r--r-- | pretyping/unification.ml | 5 |
1 files changed, 3 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' |
