Report unfinished import as

This commit is contained in:
Agus Zubiaga 2024-05-06 23:03:40 -03:00
parent bfb77b78cb
commit 97ed8fdbbd
No known key found for this signature in database
2 changed files with 32 additions and 2 deletions

View file

@ -4968,6 +4968,25 @@ mod test_reporting {
"###
);
test_report!(
unfinished_import_alias,
indoc!(
r"
import svg.Path as
"
),
@r###"
UNFINISHED IMPORT in tmp/unfinished_import_alias/Test.roc
I was partway through parsing an `import`, but I got stuck here:
4 import svg.Path as
^
I just saw the `as` keyword, so I was expecting to see an alias next.
"###
);
test_report!(
ingested_file_import_ann_syntax_err,
indoc!(