Report ingested file annotation syntax error

This commit is contained in:
Agus Zubiaga 2024-05-05 17:45:37 -03:00
parent 56f12718f1
commit 520dc389f3
No known key found for this signature in database
2 changed files with 37 additions and 0 deletions

View file

@ -4913,6 +4913,25 @@ mod test_reporting {
Note: I may be confused by indentation
"
);
test_report!(
ingested_file_import_ann_syntax_err,
indoc!(
r#"
import "example.json" as example : List U8, U32
"#
),
@r###"
UNFINISHED TYPE in tmp/ingested_file_import_ann_syntax_err/Test.roc
I am partway through parsing a type, but I got stuck here:
4 import "example.json" as example : List U8, U32
^
Note: I may be confused by indentation
"###
);
// TODO could do better by pointing out we're parsing a function type
test_report!(