diff options
| author | Matthieu Sozeau | 2016-05-25 15:24:22 +0200 |
|---|---|---|
| committer | Matthieu Sozeau | 2016-07-06 14:38:05 +0200 |
| commit | f46f4ecec94953930fca6bbbc9fdb83a7a1025fc (patch) | |
| tree | dd97bfe2b1bd0173f172488091998802aad6d41f /test-suite/bugs | |
| parent | f8a5cb590352a617de38fdd8ba5ffff7691d9841 (diff) | |
Fixed bug #4622.
Diffstat (limited to 'test-suite/bugs')
| -rw-r--r-- | test-suite/bugs/closed/4622.v | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/4622.v b/test-suite/bugs/closed/4622.v new file mode 100644 index 0000000000..ffa478cb87 --- /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. |
