aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaëtan Gilbert2020-02-24 14:13:43 +0100
committerGaëtan Gilbert2020-02-24 14:13:43 +0100
commit5fd281945bdc60c2a88f60503663df32920ef83b (patch)
tree25d22a66fa9464c7c5b1acc3075b6d6dfbc5294f
parentb04f8948b167ef227372eeffe299462b6bde1f1b (diff)
parent09252f6b060321985f2d82aa130ac7e3d6147025 (diff)
Merge PR #11588: test for x[i] notation not breaking Ltac parsing
Reviewed-by: tchajed
-rw-r--r--test-suite/success/NotationsAndLtac.v52
1 files changed, 52 insertions, 0 deletions
diff --git a/test-suite/success/NotationsAndLtac.v b/test-suite/success/NotationsAndLtac.v
new file mode 100644
index 0000000000..f3ec1916dc
--- /dev/null
+++ b/test-suite/success/NotationsAndLtac.v
@@ -0,0 +1,52 @@
+(* Test that adding notations that overlap with the tactic grammar does not
+* interfere with Ltac parsing. *)
+
+Module test1.
+ Notation "x [ y ]" := (fst (id x, id y)) (at level 11).
+
+ Goal True \/ (exists x : nat, True /\ True) -> True.
+ Proof.
+ intros [|[a [y z]]]; [idtac|idtac]; try solve [eauto | trivial; [trivial]].
+ Qed.
+End test1.
+
+Module test2.
+ Notation "x [ y ]" := (fst (id x, id y)) (at level 100).
+ Goal True \/ (exists x : nat, True /\ True) -> True.
+ Proof.
+ intros [|[a [y z]]]; [idtac|idtac]; try solve [eauto | trivial; [trivial]].
+ Qed.
+End test2.
+
+Module test3.
+ Notation "x [ y ]" := (fst (id x, id y)) (at level 1).
+ Goal True \/ (exists x : nat, True /\ True) -> True.
+ Proof.
+ intros [|[a [y z]]]; [idtac|idtac]; try solve [eauto | trivial; [trivial]].
+ Qed.
+End test3.
+
+Module test1'.
+ Notation "x [ [ y ] ] " := (fst (id x, id y)) (at level 11).
+
+ Goal True \/ (exists x : nat, True /\ True) -> True.
+ Proof.
+ intros [|[a [y z]]]; [idtac|idtac]; try solve [eauto | trivial; [trivial]].
+ Qed.
+End test1'.
+
+Module test2'.
+ Notation "x [ [ y ] ]" := (fst (id x, id y)) (at level 100).
+ Goal True \/ (exists x : nat, True /\ True) -> True.
+ Proof.
+ intros [|[a [y z]]]; [idtac|idtac]; try solve [eauto | trivial; [trivial]].
+ Qed.
+End test2'.
+
+Module test3'.
+ Notation "x [ [ y ] ]" := (fst (id x, id y)) (at level 1).
+ Goal True \/ (exists x : nat, True /\ True) -> True.
+ Proof.
+ intros [|[a [y z]]]; [idtac|idtac]; try solve [eauto | trivial; [trivial]].
+ Qed.
+End test3'.