diff options
| author | coqbot-app[bot] | 2021-01-12 08:40:31 +0000 |
|---|---|---|
| committer | GitHub | 2021-01-12 08:40:31 +0000 |
| commit | 89a44a12abc11d867d865494c28e47fe1a0a4d5b (patch) | |
| tree | 8a7f4b19b13bc7d40692e301255cba87a12ffe6b /test-suite | |
| parent | 702c96a5c191a22b5153f69e5104d76ae35190fc (diff) | |
| parent | 10eb052719f22ee6d7a69588b7f8d7830e1cbd39 (diff) | |
Merge PR #13735: Add a test for a weird behaviour of tactic matching.
Reviewed-by: SkySkimmer
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/success/let_pattern_mismatch.v | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test-suite/success/let_pattern_mismatch.v b/test-suite/success/let_pattern_mismatch.v new file mode 100644 index 0000000000..a56a8fff4f --- /dev/null +++ b/test-suite/success/let_pattern_mismatch.v @@ -0,0 +1,18 @@ +(* Weird corner case accepted by the pattern-matching algorithm. Destructuring + let-bindings in patterns can actually be shorter than the case they match. *) + +Inductive ascii : Set := +| Ascii : bool -> bool -> bool -> bool -> bool -> bool -> bool -> bool -> ascii. + +Definition dummy (a : ascii) : unit := + let (a0,a1,a2,a3,a4,a5,a6,a7) := a in tt. + +Goal forall (a : ascii) (H : tt = dummy a), True. +Proof. +intros a H. +unfold dummy in *. +(* Two bound variables in the pattern, eight in the term. *) +match goal with +| H:context [ let (x, y) := ?X in _ ] |- _ => destruct X eqn:? +end. +Abort. |
