aboutsummaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorherbelin2010-06-12 17:53:24 +0000
committerherbelin2010-06-12 17:53:24 +0000
commitdeec843772d392f71806c011351fa6d4f551115d (patch)
tree281314ec77155b7804af0636a3bd5290baaf29e2 /test-suite
parent9df6e882d61ae9c1502d9f3e81e2bf304fa6679e (diff)
Added regression tests for bugs + miscellaneous improvements
- #2095 (not fixed in v8.2 but fixed in v8.3 and trunk) - #2108 (fixed in v8.2, v8.3, trunk) - #2102 (moved warning to msg_warning to ensure flushing, but still open enhancement) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@13121 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/bugs/closed/shouldsucceed/2095.v19
-rw-r--r--test-suite/bugs/closed/shouldsucceed/2108.v22
2 files changed, 41 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/shouldsucceed/2095.v b/test-suite/bugs/closed/shouldsucceed/2095.v
new file mode 100644
index 0000000000..28ea99dfef
--- /dev/null
+++ b/test-suite/bugs/closed/shouldsucceed/2095.v
@@ -0,0 +1,19 @@
+(* Classes and sections *)
+
+Section OPT.
+ Variable A: Type.
+
+ Inductive MyOption: Type :=
+ | MyNone: MyOption
+ | MySome: A -> MyOption.
+
+ Class Opt: Type := {
+ f_opt: A -> MyOption
+ }.
+End OPT.
+
+Definition f_nat (n: nat): MyOption nat := MySome _ n.
+
+Instance Nat_Opt: Opt nat := {
+ f_opt := f_nat
+}.
diff --git a/test-suite/bugs/closed/shouldsucceed/2108.v b/test-suite/bugs/closed/shouldsucceed/2108.v
new file mode 100644
index 0000000000..cad8baa981
--- /dev/null
+++ b/test-suite/bugs/closed/shouldsucceed/2108.v
@@ -0,0 +1,22 @@
+(* Declare Module in Module Type *)
+Module Type A.
+Record t : Set := { something : unit }.
+End A.
+
+
+Module Type B.
+Declare Module BA : A.
+End B.
+
+
+Module Type C.
+Declare Module CA : A.
+Declare Module CB : B with Module BA := CA.
+End C.
+
+
+Module Type D.
+Declare Module DA : A.
+(* Next line gives: "Anomaly: uncaught exception Not_found. Please report." *)
+Declare Module DC : C with Module CA := DA.
+End D.