diff options
| author | herbelin | 2010-04-05 11:21:44 +0000 |
|---|---|---|
| committer | herbelin | 2010-04-05 11:21:44 +0000 |
| commit | a448ed995e376e87cbc0584dabda55eaaa7c53d2 (patch) | |
| tree | 7f604f20a611fbf3abc2a45b78e1be8580de2e30 | |
| parent | 13ea870a89abbd0d2d858c35f1f4907f60055d48 (diff) | |
Granting wish #2251 (forbidding rewriting a term reduced to an evar)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12900 85f007b7-540e-0410-9357-904b9bb8a0f7
| -rw-r--r-- | pretyping/unification.ml | 2 | ||||
| -rw-r--r-- | test-suite/bugs/closed/shouldfail/2251.v | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml index 22527a1b1a..ea491b9da5 100644 --- a/pretyping/unification.ml +++ b/pretyping/unification.ml @@ -763,7 +763,7 @@ let w_unify_to_subterm env ?(flags=default_unify_flags) (op,cl) evd = let rec matchrec cl = let cl = strip_outer_cast cl in (try - if closed0 cl + if closed0 cl && not (isEvar cl) then w_typed_unify env topconv flags op cl evd,cl else error "Bound 1" with ex when precatchable_exception ex -> diff --git a/test-suite/bugs/closed/shouldfail/2251.v b/test-suite/bugs/closed/shouldfail/2251.v new file mode 100644 index 0000000000..642717f4ac --- /dev/null +++ b/test-suite/bugs/closed/shouldfail/2251.v @@ -0,0 +1,5 @@ +(* Check that rewrite does not apply to single evars *) + +Lemma evar_rewrite : (forall a : nat, a = 0 -> True) -> True. +intros; eapply H. (* goal is ?30 = nil *) +rewrite plus_n_Sm. |
