catala/tests/test_func/bad/recursive.catala_en
Louis Gesbert 0ab7a0f9ce Turn all existing tests to inline tests
Done using
```bash
process() { FILE=$1; awk 'match($0, /^```catala-test *{ *id *= *"(.*)" *}/, a) {print "```catala-test-inline"; f="'"$(dirname $FILE)/output/$(basename $FILE)"'." a[1]; getline; print "$ " $0; while ((getline<f) > 0) print; next} {print}' $FILE >$FILE.new; mv $FILE.new $FILE; }
for f in tests/test_*/*/*.catala_* examples/**/*.catala_*; do process $f; git add $f; done
for d in $(find -name output -type d); do git rm -r $d; done
```
2022-09-23 14:45:10 +02:00

21 lines
462 B
Plaintext

## Article
```catala
declaration scope RecursiveFunc:
context f content integer depends on 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 | definition f of x equals f of x + 1
| ^
+ Article
```