aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/ltac.v17
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/success/ltac.v b/test-suite/success/ltac.v
index 32c6d14311..a8d1ba7f5a 100644
--- a/test-suite/success/ltac.v
+++ b/test-suite/success/ltac.v
@@ -281,3 +281,20 @@ Goal forall x:nat, True.
intro x.
Fail clear x; f x.
Abort.
+
+(* Do not consider evars as unification holes in Ltac matching (and at
+ least not as holes unrelated to the original evars)
+ [Example adapted from Ynot code]
+ *)
+
+Ltac not_eq e1 e2 :=
+ match e1 with
+ | e2 => fail 1
+ | _ => idtac
+ end.
+
+Goal True.
+evar(foo:nat).
+let evval := eval compute in foo in not_eq evval 1.
+let evval := eval compute in foo in not_eq 1 evval.
+Abort.