aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorMaxime Dénès2017-05-02 16:22:10 +0200
committerMaxime Dénès2017-05-02 16:22:10 +0200
commit510701319b1b0420698e411e24022a0fbec7c36c (patch)
treeef075e85ce6a2dd3002a356c8a5cd738de72f0dd /test-suite
parent1f2303052c5422699db2ef7673b35fae42108114 (diff)
parentc3aec655a8a33fff676c79e12888d193cc2e237b (diff)
Merge PR#597: Fixing #5487 (v8.5 regression on ltac-matching expressions with evars).
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/5487.v9
-rw-r--r--test-suite/success/ltac.v13
2 files changed, 22 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/5487.v b/test-suite/bugs/closed/5487.v
new file mode 100644
index 0000000000..9b995f4503
--- /dev/null
+++ b/test-suite/bugs/closed/5487.v
@@ -0,0 +1,9 @@
+(* Was a collision between an ltac pattern variable and an evar *)
+
+Goal forall n, exists m, n = m :> nat.
+Proof.
+ eexists.
+ Fail match goal with
+ | [ |- ?x = ?y ]
+ => match x with y => idtac end
+ end.
diff --git a/test-suite/success/ltac.v b/test-suite/success/ltac.v
index ce90990594..d7ec092d76 100644
--- a/test-suite/success/ltac.v
+++ b/test-suite/success/ltac.v
@@ -317,3 +317,16 @@ let T := constr:(fun a b : nat => a) in
end.
exact (eq_refl n).
Qed.
+
+(* A variant of #2602 which was wrongly succeeding because "a", bound to
+ "?m", was then internally turned into a "_" in the second matching *)
+
+Goal exists m, S m > 0.
+eexists.
+Fail match goal with
+ | |- context [ S ?a ] =>
+ match goal with
+ | |- S a > a => idtac
+ end
+end.
+Abort.