diff options
author | 2016-07-06 14:38:46 +0200 | |
---|---|---|
committer | 2016-07-06 14:38:46 +0200 | |
commit | d0afde58b3320b65fc755cca5600af3b1bc9fa82 (patch) | |
tree | f38db9d81d3646cfab19bded2dea746674fb6e80 /test-suite | |
parent | 9a1eb2f4fefcc52f56785f20831e854bb626ae95 (diff) | |
parent | df24a81b255190493281ffdeeef36754b076e9cd (diff) |
Merge branch 'primproj' into v8.6
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/bugs/closed/4622.v | 24 | ||||
-rw-r--r-- | test-suite/success/primitiveproj.v | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/4622.v b/test-suite/bugs/closed/4622.v new file mode 100644 index 000000000..ffa478cb8 --- /dev/null +++ b/test-suite/bugs/closed/4622.v @@ -0,0 +1,24 @@ +Set Primitive Projections. + +Record foo : Type := bar { x : unit }. + +Goal forall t u, bar t = bar u -> t = u. +Proof. + intros. + injection H. + trivial. +Qed. +(* Was: Error: Pattern-matching expression on an object of inductive type foo has invalid information. *) + +(** Dependent pattern-matching is ok on this one as it has eta *) +Definition baz (x : foo) := + match x as x' return x' = x' with + | bar u => eq_refl + end. + +Inductive foo' : Type := bar' {x' : unit; y: foo'}. +(** Dependent pattern-matching is not ok on this one *) +Fail Definition baz' (x : foo') := + match x as x' return x' = x' with + | bar' u y => eq_refl + end. diff --git a/test-suite/success/primitiveproj.v b/test-suite/success/primitiveproj.v index b5e6ccd61..2fa770494 100644 --- a/test-suite/success/primitiveproj.v +++ b/test-suite/success/primitiveproj.v @@ -47,7 +47,9 @@ Check _.(next) : option Y. Lemma eta_ind (y : Y) : y = Build_Y y.(next). Proof. Fail reflexivity. Abort. +Inductive Fdef := { Fa : nat ; Fb := Fa; Fc : Fdef }. +Fail Scheme Fdef_rec := Induction for Fdef Sort Prop. (* Rules for parsing and printing of primitive projections and their eta expansions. |