aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proofs/goal.ml2
-rw-r--r--test-suite/bugs/closed/2969.v25
2 files changed, 26 insertions, 1 deletions
diff --git a/proofs/goal.ml b/proofs/goal.ml
index 1a7e9a9830..a2efc10f02 100644
--- a/proofs/goal.ml
+++ b/proofs/goal.ml
@@ -474,7 +474,7 @@ module V82 = struct
(* Old style hyps primitive *)
let hyps evars gl =
let evi = content evars gl in
- Evd.evar_hyps evi
+ Evd.evar_filtered_hyps evi
(* Access to ".evar_concl" *)
let concl evars gl =
diff --git a/test-suite/bugs/closed/2969.v b/test-suite/bugs/closed/2969.v
new file mode 100644
index 0000000000..ff75a1f320
--- /dev/null
+++ b/test-suite/bugs/closed/2969.v
@@ -0,0 +1,25 @@
+(* Check that Goal.V82.byps and Goal.V82.env are consistent *)
+
+(* This is a shorten variant of the initial bug which raised anomaly *)
+
+Goal forall x : nat, (forall z, (exists y:nat, z = y) -> True) -> True.
+evar nat.
+intros x H.
+apply (H n).
+unfold n. clear n.
+eexists.
+reflexivity.
+Grab Existential Variables.
+admit.
+
+(* Alternative variant which failed but without raising anomaly *)
+
+Goal forall x : nat, True.
+evar nat.
+intro x.
+evar nat.
+assert (H := eq_refl : n0 = n).
+clearbody n n0.
+exact I.
+Grab Existential Variables.
+admit.