mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Multiple record builder error
This commit is contained in:
parent
20f8133b6c
commit
6670fbb1ab
11 changed files with 115 additions and 4 deletions
|
@ -2133,6 +2133,20 @@ fn pretty_runtime_error<'b>(
|
|||
|
||||
title = "DEGENERATE BRANCH";
|
||||
}
|
||||
RuntimeError::MultipleRecordBuilders(region) => {
|
||||
let tip = alloc
|
||||
.tip()
|
||||
.append(alloc.reflow("You can combine them or apply them separately."));
|
||||
|
||||
doc = alloc.stack([
|
||||
alloc.reflow("This function is applied to multiple record builders:"),
|
||||
alloc.region(lines.convert_region(region)),
|
||||
alloc.note("Functions can only take at most one record builder!"),
|
||||
tip,
|
||||
]);
|
||||
|
||||
title = "MULTIPLE RECORD BUILDERS";
|
||||
}
|
||||
}
|
||||
|
||||
(doc, title)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue