improve formatting of records in pattern exhaustiveness errors

This commit is contained in:
Folkert 2020-04-23 21:49:24 +02:00
parent c54d61c854
commit 848764cb25
5 changed files with 81 additions and 30 deletions

View file

@ -9,7 +9,7 @@ use roc_module::symbol::Symbol;
use crate::expr::specialize_equality;
use crate::layout::Builtin;
use crate::layout::Layout;
use crate::pattern::{Ctor, TagId, Union};
use crate::pattern::{Ctor, RenderAs, TagId, Union};
/// COMPILE CASES
@ -381,7 +381,9 @@ fn test_at_path<'a>(selected_path: &Path, branch: Branch<'a>, all_tests: &mut Ve
}
RecordDestructure(destructs, _) => {
// not rendered, so pick the easiest
let union = Union {
render_as: RenderAs::Tag,
alternatives: vec![Ctor {
tag_id: TagId(0),
name: TagName::Global("#Record".into()),