aboutsummaryrefslogtreecommitdiff
path: root/test-suite/bugs
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2015-10-29 13:04:22 +0100
committerPierre-Marie Pédrot2015-10-29 13:11:38 +0100
commitf970991baef49fa5903e6b7aeb6ac62f8cfdf822 (patch)
tree0b14bafe702a6219d960111148ff3a0cdc9e18e6 /test-suite/bugs
parent4444f04cfdbe449d184ac1ce0a56eb484805364d (diff)
parent78378ba9a79b18a658828d7a110414ad18b9a732 (diff)
Merge branch 'v8.5'
Diffstat (limited to 'test-suite/bugs')
-rw-r--r--test-suite/bugs/closed/3974.v7
-rw-r--r--test-suite/bugs/closed/3975.v8
-rw-r--r--test-suite/bugs/closed/4375.v106
-rw-r--r--test-suite/bugs/closed/4390.v37
4 files changed, 158 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/3974.v b/test-suite/bugs/closed/3974.v
new file mode 100644
index 0000000000..b6be159595
--- /dev/null
+++ b/test-suite/bugs/closed/3974.v
@@ -0,0 +1,7 @@
+Module Type S.
+End S.
+
+Module Type M (X : S).
+ Fail Module P (X : S).
+ (* Used to say: Anomaly: X already exists. Please report. *)
+ (* Should rather say now: Error: X already exists. *) \ No newline at end of file
diff --git a/test-suite/bugs/closed/3975.v b/test-suite/bugs/closed/3975.v
new file mode 100644
index 0000000000..95851c8137
--- /dev/null
+++ b/test-suite/bugs/closed/3975.v
@@ -0,0 +1,8 @@
+Module Type S. End S.
+
+Module M (X:S). End M.
+
+Module Type P (X : S).
+ Print M.
+ (* Used to say: Anomaly: X already exists. Please report. *)
+ (* Should rather : print something :-) *) \ No newline at end of file
diff --git a/test-suite/bugs/closed/4375.v b/test-suite/bugs/closed/4375.v
new file mode 100644
index 0000000000..03af16535b
--- /dev/null
+++ b/test-suite/bugs/closed/4375.v
@@ -0,0 +1,106 @@
+
+
+Polymorphic Fixpoint g@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ t.
+
+
+Module A.
+Polymorphic Fixpoint foo@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ match n with
+ | 0 => t
+ | S n => bar t n
+ end
+
+with bar (t : Type@{i}) (n : nat) : Type@{i} :=
+ match n with
+ | 0 => t
+ | S n => foo t n
+ end.
+End A.
+
+Module B.
+Polymorphic Fixpoint foo@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ match n with
+ | 0 => t
+ | S n => bar t n
+ end
+
+with bar@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ match n with
+ | 0 => t
+ | S n => foo t n
+ end.
+End B.
+
+Module C.
+Fail Polymorphic Fixpoint foo@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ match n with
+ | 0 => t
+ | S n => bar t n
+ end
+
+with bar@{j} (t : Type@{j}) (n : nat) : Type@{j} :=
+ match n with
+ | 0 => t
+ | S n => foo t n
+ end.
+End C.
+
+Module D.
+Polymorphic Fixpoint foo@{i j} (t : Type@{i}) (n : nat) : Type@{i} :=
+ match n with
+ | 0 => t
+ | S n => bar t n
+ end
+
+with bar@{i j} (t : Type@{j}) (n : nat) : Type@{j} :=
+ match n with
+ | 0 => t
+ | S n => foo t n
+ end.
+End D.
+
+Module E.
+Fail Polymorphic Fixpoint foo@{i j} (t : Type@{i}) (n : nat) : Type@{i} :=
+ match n with
+ | 0 => t
+ | S n => bar t n
+ end
+
+with bar@{j i} (t : Type@{j}) (n : nat) : Type@{j} :=
+ match n with
+ | 0 => t
+ | S n => foo t n
+ end.
+End E.
+
+(*
+Polymorphic Fixpoint g@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ t.
+
+Print g.
+
+Polymorphic Fixpoint a@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ t
+with b@{i} (t : Type@{i}) (n : nat) : Type@{i} :=
+ t.
+
+Print a.
+Print b.
+*)
+
+Polymorphic CoInductive foo@{i} (T : Type@{i}) : Type@{i} :=
+| A : foo T -> foo T.
+
+Polymorphic CoFixpoint cg@{i} (t : Type@{i}) : foo@{i} t :=
+ @A@{i} t (cg@{i} t).
+
+Print cg.
+
+Polymorphic CoFixpoint ca@{i} (t : Type@{i}) : foo@{i} t :=
+ @A@{i} t (@cb@{i} t)
+with cb@{i} (t : Type@{i}) : foo@{i} t :=
+ @A@{i} t (@ca@{i} t).
+
+Print ca.
+Print cb. \ No newline at end of file
diff --git a/test-suite/bugs/closed/4390.v b/test-suite/bugs/closed/4390.v
new file mode 100644
index 0000000000..a96a137001
--- /dev/null
+++ b/test-suite/bugs/closed/4390.v
@@ -0,0 +1,37 @@
+Module A.
+Set Printing All.
+Set Printing Universes.
+
+Module M.
+Section foo.
+Universe i.
+End foo.
+End M.
+
+Check Type@{i}.
+(* Succeeds *)
+
+Fail Check Type@{j}.
+(* Error: Undeclared universe: j *)
+
+Definition foo@{j} : Type@{i} := Type@{j}.
+(* ok *)
+End A.
+
+Set Universe Polymorphism.
+Fail Universes j.
+Monomorphic Universe j.
+Section foo.
+ Universes i.
+ Constraint i < j.
+ Definition foo : Type@{j} := Type@{i}.
+ Definition foo' : Type@{j} := Type@{i}.
+End foo.
+
+Check eq_refl : foo@{i} = foo'@{i}.
+
+Definition bar := foo.
+Monomorphic Definition bar'@{k} := foo@{k}.
+
+Fail Constraint j = j.
+Monomorphic Constraint i = i.