test-suite/bugs/bug_14135.v
raw| 1 | Require Import Ltac2.Ltac2. |
| 2 | |
| 3 | Set Warnings "+redundant-pattern". |
| 4 | |
| 5 | Ltac2 good_1(o: 'a option) := |
| 6 | match o with |
| 7 | | Some x => 1 |
| 8 | | None => 2 |
| 9 | end. |
| 10 | |
| 11 | Ltac2 good_2(o: 'a option) := |
| 12 | match o with |
| 13 | | Some x => 1 |
| 14 | | _ => 2 |
| 15 | end. |
| 16 | |
| 17 | Fail Ltac2 redundant_constructor(o: 'a option) := |
| 18 | match o with |
| 19 | | Some x => 1 |
| 20 | | None => 2 |
| 21 | | Some y => 3 |
| 22 | end. |
| 23 | |
| 24 | Fail Ltac2 redundant_catch_all(o: 'a option) := |
| 25 | match o with |
| 26 | | Some x => 1 |
| 27 | | None => 2 |
| 28 | | _ => 3 |
| 29 | end. |