aboutsummaryrefslogtreecommitdiff
path: root/tactics
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-09-30 16:42:54 +0200
committerPierre-Marie Pédrot2016-09-30 16:58:17 +0200
commit024cf5ae087024399cc894b121437d72cd11b480 (patch)
tree243c6d661fe52ceba2a7b8005aa31e9ee1b9e7ee /tactics
parent14427a707f0e97e15e01bb9d297319917a0379f2 (diff)
Fix bug #4471: [generalize dependent] permits ill-typed terms in trunk.
This bug was introduced by 37ab45726, because the new apply_type function was not checking that the new goal was indeed well-typed. We add this check locally in the generalize dependent tactic.
Diffstat (limited to 'tactics')
-rw-r--r--tactics/tactics.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/tactics/tactics.ml b/tactics/tactics.ml
index 2d901c2dbc..2fe8e0bc34 100644
--- a/tactics/tactics.ml
+++ b/tactics/tactics.ml
@@ -2807,6 +2807,8 @@ let old_generalize_dep ?(with_let=false) c gl =
in
let cl'',evd = generalize_goal gl 0 ((AllOccurrences,c,body),Anonymous)
(cl',project gl) in
+ (** Check that the generalization is indeed well-typed *)
+ let (evd, _) = Typing.type_of env evd cl'' in
let args = Context.Named.to_instance to_quantify_rev in
tclTHENLIST
[tclEVARS evd;