test-suite/failure/Case7.v
raw| 1 | Inductive listn : nat -> Set := |
| 2 | | niln : listn 0 |
| 3 | | consn : forall n : nat, nat -> listn n -> listn (S n). |
| 4 | |
| 5 | Definition length1 (n : nat) (l : listn n) := |
| 6 | match l with |
| 7 | | consn n _ (consn m _ _) => S (S m) |
| 8 | | consn n _ _ => 1 |
| 9 | | _ => 0 |
| 10 | end. |
| 11 | |
| 12 | Fail Type |
| 13 | (fun (n : nat) (l : listn n) => |
| 14 | match n return nat with |
| 15 | | O => 0 |
| 16 | | S n => match l return nat with |
| 17 | | niln => 1 |
| 18 | | l' => length1 (S n) l' |
| 19 | end |
| 20 | end). |