Merge pull request #3616 from rtfeldman/i3614

Compile branches in the presence of degenerate patterns
This commit is contained in:
Folkert de Vries 2022-07-25 19:45:36 +02:00 committed by GitHub
commit d212dffa1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 210 additions and 66 deletions

View file

@ -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)