Handle record apply found in module params

This commit is contained in:
Agus Zubiaga 2024-05-09 07:55:39 -03:00
parent b8280bf69a
commit f3b71c46e7
No known key found for this signature in database
2 changed files with 42 additions and 1 deletions

View file

@ -4961,6 +4961,30 @@ mod test_reporting {
"###
);
test_report!(
record_builder_in_module_params,
indoc!(
r"
import Menu {
echo,
name: <- applyName
}
"
),@r###"
RECORD BUILDER IN MODULE PARAMS in ...ord_builder_in_module_params/Test.roc
I was partway through parsing module params, but I got stuck here:
4 import Menu {
5 echo,
6 name: <- applyName
^^^^^^^^^^^^^^^^^^
This looks like a record builder field, but those are not allowed in
module params.
"###
);
test_report!(
unfinished_import_as_or_exposing,
indoc!(