aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/bugs/closed/3315.v
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2014-06-10 16:33:17 -0400
committerGravatar Jason Gross <jgross@mit.edu>2014-06-10 20:14:06 -0400
commita34a98f1a8c3e1ab4b1b25a6050604b2d5bd7303 (patch)
tree0a0f91a115f42eefda2d699766b06b7cdb63613b /test-suite/bugs/closed/3315.v
parentd4bd96e60efe1a4509eb21585134ebb6c80d0bd4 (diff)
Add many more cases to the test-suite
I'd add more, but I'm tired and it's late and I should sleep. Maybe I'll pick up at 3279 (working down) another day. Bug 3344 is broken; [Fail Defined.] says that [Defined] has not failed, even though it raises an anomaly. So there's no way I can think of to test it. I've left it in the [opened] directory anyway.
Diffstat (limited to 'test-suite/bugs/closed/3315.v')
-rw-r--r--test-suite/bugs/closed/3315.v36
1 files changed, 36 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/3315.v b/test-suite/bugs/closed/3315.v
new file mode 100644
index 000000000..1aebb5ad2
--- /dev/null
+++ b/test-suite/bugs/closed/3315.v
@@ -0,0 +1,36 @@
+Set Universe Polymorphism.
+Set Primitive Projections.
+Record sigT {A : Type} (P : A -> Type) := existT { projT1 : A; projT2 : P projT1 }.
+Arguments existT {A} _ _ _.
+Definition unpack_sigma' {A} {P : A -> Type} (Q : sigT P -> Type) (u : sigT P) :
+ Q (existT _ (projT1 u) (projT2 u)) -> Q u
+ :=
+ fun H =>
+ (let (x,p) as u return (Q (existT _ (projT1 u) (projT2 u)) -> Q u) := u in fun x : Q (existT _ _ p) => x) H. (* success *)
+Definition unpack_sigma {A} {P : A -> Type} (Q : sigT P -> Type) (u : sigT P) :
+ Q (existT _ (projT1 u) (projT2 u)) -> Q u
+ :=
+ fun H =>
+ (let (x,p) as u return (Q (existT _ (projT1 u) (projT2 u)) -> Q u) := u in fun x => x) H.
+(* Toplevel input, characters 219-229:
+Error:
+In environment
+A : Type
+P : A -> Type
+Q : sigT P -> Type
+u : sigT P
+H : Q {| projT1 := projT1 u; projT2 := projT2 u |}
+x : A
+p : P x
+The term
+ "fun
+ x : Q
+ {|
+ projT1 := projT1 {| projT1 := x; projT2 := p |};
+ projT2 := projT2 {| projT1 := x; projT2 := p |} |} => x" has type
+ "Q
+ {|
+ projT1 := projT1 {| projT1 := x; projT2 := p |};
+ projT2 := projT2 {| projT1 := x; projT2 := p |} |} ->
+... "
+*)