catala/tests/test_variable_state/bad/unknown_state.catala_en
Aminata-Dev b087ca4f47 Improve suggestions
- Improved implementation of suggestions (suggestion_minimum_levenshtein_distance_association > suggestions.ml)
- Magnifying glass emoji added for suggestions
- Improve display by...
	- Fixing "Pos.ml" (pretty-printing box not closed)
	- Remove unnecessary spaces
- compiler/surface/parserdriver.ml
	- Optionnal suggestions added when raising a parser error
	- Function "levenshtein_distance" removed and replaced by "Suggestions.levenshtein_distance"
- Tests updated (mostly line breaks and spacing changes)
- Variable names renamed for greater clarity
- (Based on commit 0813f5c36e)
2023-07-12 11:55:11 +02:00

34 lines
703 B
Plaintext

## Test
```catala
declaration scope A:
output foo content integer
state bar
state baz
scope A:
definition foo state bar equals 1
definition foo state basz equals foo + 1
```
```catala-test-inline
$ catala Typecheck
[ERROR]
This identifier is not a state declared for variable foo.
┌─⯈ tests/test_variable_state/bad/unknown_state.catala_en:12.24-12.28:
└──┐
12 │ definition foo state basz equals foo + 1
│ ‾‾‾‾
└─ Test
Variable declaration:
┌─⯈ tests/test_variable_state/bad/unknown_state.catala_en:5.10-5.13:
└─┐
5 │ output foo content integer
│ ‾‾‾
└─ Test
#return code 123#
```