mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-12 21:48:25 +03:00
22 lines
522 B
Plaintext
22 lines
522 B
Plaintext
## Article
|
|
|
|
```catala
|
|
declaration scope RecursiveFunc:
|
|
context f content integer depends on x content integer
|
|
|
|
scope RecursiveFunc:
|
|
definition f of x equals f of x + 1
|
|
```
|
|
|
|
```catala-test-inline
|
|
$ catala Interpret -s RecursiveFunc
|
|
[ERROR] The variable f is used in one of its definitions, but recursion is forbidden in Catala
|
|
|
|
┌─⯈ tests/test_func/bad/recursive.catala_en:8.28-8.29:
|
|
└─┐
|
|
8 │ definition f of x equals f of x + 1
|
|
│ ‾
|
|
└─ Article
|
|
#return code 255#
|
|
```
|