Report missing params

This commit is contained in:
Agus Zubiaga 2024-07-02 02:59:39 -03:00
parent bc6a84a215
commit 922b1c44ef
No known key found for this signature in database
16 changed files with 286 additions and 93 deletions

View file

@ -5005,6 +5005,27 @@ mod test_reporting {
"###
);
test_report!(
unexpected_module_params,
indoc!(
r#"
import Dict { key: "abc" } exposing [empty]
empty {}
"#
),@r###"
UNEXPECTED PARAMS in /code/proj/Main.roc
This import specifies module params:
4 import Dict { key: "abc" } exposing [empty]
^^^^^^^^^^^^^^
However, Dict does not expect any. Did you intend to import a
different module?
"###
);
test_report!(
unfinished_import_as_or_exposing,
indoc!(