mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Merge branch 'main' into builtin-task
This commit is contained in:
commit
7e72541a79
82 changed files with 2468 additions and 1003 deletions
|
@ -16,7 +16,7 @@ mod test_reporting {
|
|||
use roc_load::{self, ExecutionMode, LoadConfig, LoadedModule, LoadingProblem, Threading};
|
||||
use roc_module::symbol::{Interns, ModuleId};
|
||||
use roc_packaging::cache::RocCacheDir;
|
||||
use roc_parse::module::parse_header;
|
||||
use roc_parse::header::parse_header;
|
||||
use roc_parse::state::State;
|
||||
use roc_parse::test_helpers::parse_expr_with;
|
||||
use roc_problem::Severity;
|
||||
|
@ -359,7 +359,7 @@ mod test_reporting {
|
|||
let src_lines: Vec<&str> = src.split('\n').collect();
|
||||
let lines = LineInfo::new(src);
|
||||
|
||||
match roc_parse::module::parse_header(arena, state) {
|
||||
match roc_parse::header::parse_header(arena, state) {
|
||||
Err(fail) => {
|
||||
let interns = Interns::default();
|
||||
let home = crate::helpers::test_home();
|
||||
|
@ -10876,12 +10876,12 @@ All branches in an `if` must have the same type!
|
|||
),
|
||||
@r#"
|
||||
── EMPTY RECORD BUILDER in /code/proj/Main.roc ─────────────────────────────────
|
||||
|
||||
|
||||
This record builder has no fields:
|
||||
|
||||
|
||||
4│ { a <- }
|
||||
^^^^^^^^
|
||||
|
||||
|
||||
I need at least two fields to combine their values into a record.
|
||||
"#
|
||||
);
|
||||
|
@ -10899,11 +10899,11 @@ All branches in an `if` must have the same type!
|
|||
── NOT ENOUGH FIELDS IN RECORD BUILDER in /code/proj/Main.roc ──────────────────
|
||||
|
||||
This record builder only has one field:
|
||||
|
||||
|
||||
4│> { a <-
|
||||
5│> b: 123
|
||||
6│> }
|
||||
|
||||
|
||||
I need at least two fields to combine their values into a record.
|
||||
"#
|
||||
);
|
||||
|
@ -10920,14 +10920,14 @@ All branches in an `if` must have the same type!
|
|||
),
|
||||
@r#"
|
||||
── OPTIONAL FIELD IN RECORD BUILDER in /code/proj/Main.roc ─────────────────────
|
||||
|
||||
|
||||
Optional fields are not allowed to be used in record builders.
|
||||
|
||||
|
||||
4│ { a <-
|
||||
5│ b: 123,
|
||||
6│> c? 456
|
||||
7│ }
|
||||
|
||||
|
||||
Record builders can only have required values for their fields.
|
||||
"#
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue