test-suite/bugs/bug_5547.v
raw| 1 | (* Checking typability of intermediate return predicates in nested pattern-matching *) |
| 2 | |
| 3 | Inductive A : (Type->Type) -> Type := J : A (fun x => x). |
| 4 | Definition ret (x : nat * A (fun x => x)) |
| 5 | := match x return Type with |
| 6 | | (y,z) => match z in A f return f Type with |
| 7 | | J => bool |
| 8 | end |
| 9 | end. |
| 10 | Definition foo : forall x, ret x. |
| 11 | Proof. |
| 12 | Fail refine (fun x |
| 13 | => match x return ret x with |
| 14 | | (y,J) => true |
| 15 | end |
| 16 | ). |
| 17 | Abort. |