aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tactics/decl_proof_instr.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/tactics/decl_proof_instr.ml b/tactics/decl_proof_instr.ml
index 26a2bd48e9..e7acd6d646 100644
--- a/tactics/decl_proof_instr.ml
+++ b/tactics/decl_proof_instr.ml
@@ -1001,7 +1001,9 @@ let rec add_branch env ((id,_) as cpl) pats tree=
br.(pred cnum) in
Split (ids,ind,br)
| Split (ids,ind0,br0) ->
- assert (ind=ind0);
+ if (ind <> ind0) then error
+ (* this can happen with coercions *)
+ "Case pattern belongs to wrong inductive type";
let br=Array.copy br0 in
let ca = constructor_arities env ind in
let _= br.(pred cnum)<-