aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pretyping/unification.ml3
-rw-r--r--test-suite/success/evars.v16
2 files changed, 18 insertions, 1 deletions
diff --git a/pretyping/unification.ml b/pretyping/unification.ml
index b45d23098..38cf59bc0 100644
--- a/pretyping/unification.ml
+++ b/pretyping/unification.ml
@@ -673,7 +673,8 @@ let w_merge env with_types flags (evd,metas,evars) =
metas evars' eqns
| _ ->
- w_merge_rec (solve_simple_evar_eqn env evd ev rhs')
+ let evd', rhs'' = pose_all_metas_as_evars env evd rhs' in
+ w_merge_rec (solve_simple_evar_eqn env evd' ev rhs'')
metas evars' eqns
end
| [] ->
diff --git a/test-suite/success/evars.v b/test-suite/success/evars.v
index 6423ad14e..69f7164c7 100644
--- a/test-suite/success/evars.v
+++ b/test-suite/success/evars.v
@@ -238,3 +238,19 @@ eapply f_equal with (* should fail because ill-typed *)
end) in H
|| injection H.
Abort.
+
+(* A legitimate simple eapply that was failing in coq <= 8.3.
+ Cf. in Unification.w_merge the addition of an extra pose_all_metas_as_evars
+ on 30/9/2010
+*)
+
+Lemma simple_eapply_was_failing :
+ (forall f:nat->nat, exists g, f = g) -> True.
+Proof.
+ assert (modusponens : forall P Q, P -> (P->Q) -> Q) by auto.
+ intros.
+ eapply modusponens.
+ simple eapply H.
+ (* error message with V8.3 :
+ Impossible to unify "?18" with "fun g : nat -> nat => ?6 = g". *)
+Abort.