aboutsummaryrefslogtreecommitdiff
path: root/test-suite/success
diff options
context:
space:
mode:
authorbarras2008-12-02 10:38:29 +0000
committerbarras2008-12-02 10:38:29 +0000
commitff45afa83a9235cbe33af525b6b0c7985dc7e091 (patch)
tree4daa5623d3efc4641c536c1a47a385d3be49cdb1 /test-suite/success
parentf34f1330b6cce198fdf6f99a31ae46e1a7fa8abb (diff)
fixed kernel bug (de Bruijn) + test-suite
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11646 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/success')
-rw-r--r--test-suite/success/Inversion.v4
-rw-r--r--test-suite/success/guard.v11
2 files changed, 13 insertions, 2 deletions
diff --git a/test-suite/success/Inversion.v b/test-suite/success/Inversion.v
index 54b03b3eba..b08ffcc32b 100644
--- a/test-suite/success/Inversion.v
+++ b/test-suite/success/Inversion.v
@@ -102,8 +102,8 @@ Abort.
(* Check non-regression of bug #1968 *)
-Inductive foo : option nat -> Prop := Foo : forall t, foo (Some t).
-Goal forall o, foo o -> 0 = 1.
+Inductive foo2 : option nat -> Prop := Foo : forall t, foo2 (Some t).
+Goal forall o, foo2 o -> 0 = 1.
intros.
eapply trans_eq.
inversion H.
diff --git a/test-suite/success/guard.v b/test-suite/success/guard.v
new file mode 100644
index 0000000000..b9181d430a
--- /dev/null
+++ b/test-suite/success/guard.v
@@ -0,0 +1,11 @@
+(* Specific tests about guard condition *)
+
+(* f must unfold to x, not F (de Bruijn mix-up!) *)
+Check let x (f:nat->nat) k := f k in
+ fun (y z:nat->nat) =>
+ let f:=x in (* f := Rel 3 *)
+ fix F (n:nat) : nat :=
+ match n with
+ | 0 => 0
+ | S k => f F k (* here Rel 3 = F ! *)
+ end.