mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
Merge pull request #3616 from rtfeldman/i3614
Compile branches in the presence of degenerate patterns
This commit is contained in:
commit
d212dffa1a
14 changed files with 210 additions and 66 deletions
|
@ -1899,6 +1899,14 @@ fn pretty_runtime_error<'b>(
|
|||
|
||||
title = OPAQUE_OVER_APPLIED;
|
||||
}
|
||||
RuntimeError::DegenerateBranch(region) => {
|
||||
doc = alloc.stack([
|
||||
alloc.reflow("This branch pattern does not bind all symbols its body needs:"),
|
||||
alloc.region(lines.convert_region(region)),
|
||||
]);
|
||||
|
||||
title = "DEGENERATE BRANCH";
|
||||
}
|
||||
}
|
||||
|
||||
(doc, title)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue