mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Unapplied record builder error
This commit is contained in:
parent
6670fbb1ab
commit
d2a57112fd
10 changed files with 82 additions and 11 deletions
|
@ -2147,6 +2147,18 @@ fn pretty_runtime_error<'b>(
|
|||
|
||||
title = "MULTIPLE RECORD BUILDERS";
|
||||
}
|
||||
RuntimeError::UnappliedRecordBuilder(region) => {
|
||||
doc = alloc.stack([
|
||||
alloc.reflow("This record builder was not applied to a function:"),
|
||||
alloc.region(lines.convert_region(region)),
|
||||
alloc.reflow("However, we need a function to construct the record."),
|
||||
alloc.note(
|
||||
"Functions must be applied directly. The pipe operator (|>) cannot be used.",
|
||||
),
|
||||
]);
|
||||
|
||||
title = "UNAPPLIED RECORD BUILDER";
|
||||
}
|
||||
}
|
||||
|
||||
(doc, title)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue