aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2021-03-08 18:47:10 +0100
committerPierre-Marie Pédrot2021-03-10 12:16:19 +0100
commite17a1a832a077793a662d817c40e2a3b5bc1ed9c (patch)
tree7522e9c7de984ce6a013ed878c183948544568d8
parent8873ff0541e1902608d5d87b8158ff6b1d6f9d89 (diff)
Adding a parsing test.
-rw-r--r--test-suite/ltac2/syntax_cast.v14
1 files changed, 14 insertions, 0 deletions
diff --git a/test-suite/ltac2/syntax_cast.v b/test-suite/ltac2/syntax_cast.v
new file mode 100644
index 0000000000..f62d49173d
--- /dev/null
+++ b/test-suite/ltac2/syntax_cast.v
@@ -0,0 +1,14 @@
+Require Import Ltac2.Ltac2.
+
+Ltac2 foo0 x y : unit := ().
+Ltac2 foo1 : unit := ().
+Fail Ltac2 foo2 : unit -> unit := ().
+Ltac2 foo3 : unit -> unit := fun (_ : unit) => ().
+
+Ltac2 bar0 := fun x y : unit => ().
+Fail Ltac2 bar1 := fun x : unit => 0.
+Ltac2 bar2 := fun x : unit list => [].
+
+Ltac2 qux0 := let x : unit := () in ().
+Ltac2 qux1 () := let x y z : unit := () in x 0 "".
+Fail Ltac2 qux2 := let x : unit -> unit := () in ().