mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Report module params parse error
This commit is contained in:
parent
5b1a3c8f03
commit
760ffaf68f
7 changed files with 74 additions and 1 deletions
|
@ -6210,6 +6210,31 @@ In roc, functions are always written as a lambda, like{}
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn module_params_with_missing_arrow() {
|
||||
report_header_problem_as(
|
||||
indoc!(
|
||||
r#"
|
||||
module {echo, read} [menu]
|
||||
"#
|
||||
),
|
||||
indoc!(
|
||||
r#"
|
||||
── WEIRD MODULE PARAMS in /code/proj/Main.roc ──────────────────────────────────
|
||||
|
||||
I am partway through parsing a module header, but I got stuck here:
|
||||
|
||||
1│ module {echo, read} [menu]
|
||||
^
|
||||
|
||||
I am expecting `->` next, like:
|
||||
|
||||
module { echo, read } -> [menu]
|
||||
"#
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn platform_requires_rigids() {
|
||||
report_header_problem_as(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue