| 1 |
Require Import Ltac2.Ltac2. |
| 2 |
|
| 3 |
Fail Ltac2 rec foo(i: int)(j: int) := |
| 4 |
foo i (bar j) |
| 5 |
(*^^^*) |
| 6 |
with bar(i: int) := |
| 7 |
Int.add (foo i (*i*)) 1. |
| 8 |
|
| 9 |
Fail Ltac2 rec bar(i: int) := |
| 10 |
Int.add (foo i (*i*)) 1 |
| 11 |
with foo(i: int)(j: int) : bool := |
| 12 |
foo i (bar j). |
| 13 |
|
| 14 |
(* The location is not great if we write "fun x y => x" but that's |
| 15 |
unrelated to what we're testing here. |
| 16 |
|
| 17 |
Also the toplevel "Ltac2 rec foo :=" is currently not smart enough to recognize a function with type annotation. *) |
| 18 |
Fail Ltac2 foo := let rec foo : int -> int := fun x => fun y => x in foo. |