2021-05-26 21:48:44 +03:00
|
|
|
## Article
|
|
|
|
|
|
|
|
```catala
|
|
|
|
declaration scope RecursiveFunc:
|
2023-02-24 12:02:12 +03:00
|
|
|
context f content integer depends on x content integer
|
2021-05-26 21:48:44 +03:00
|
|
|
|
|
|
|
scope RecursiveFunc:
|
|
|
|
definition f of x equals f of x + 1
|
|
|
|
```
|
2022-07-08 17:23:09 +03:00
|
|
|
|
2022-09-23 15:04:13 +03:00
|
|
|
```catala-test-inline
|
|
|
|
$ catala Interpret -s RecursiveFunc
|
|
|
|
[ERROR] The variable f is used in one of its definitions, but recursion is forbidden in Catala
|
|
|
|
|
2023-04-17 19:07:22 +03:00
|
|
|
┌─⯈ tests/test_func/bad/recursive.catala_en:8.28-8.29:
|
2022-10-27 13:18:00 +03:00
|
|
|
└─┐
|
|
|
|
8 │ definition f of x equals f of x + 1
|
|
|
|
│ ‾
|
|
|
|
└─ Article
|
2022-09-23 15:10:07 +03:00
|
|
|
#return code 255#
|
2022-07-08 17:23:09 +03:00
|
|
|
```
|