fix issue with one-element records containing a union in the closure argument

This commit is contained in:
Folkert 2020-12-08 16:05:51 +01:00
parent 1930a27b24
commit fc85761783
4 changed files with 32 additions and 14 deletions

View file

@ -987,8 +987,11 @@ impl<'a> Expr<'a> {
} => {
let doc_tag = match tag_name {
TagName::Global(s) => alloc.text(s.as_str()),
TagName::Private(s) => alloc.text(format!("{}", s)),
TagName::Closure(s) => alloc.text(format!("Closure({})", s)),
TagName::Private(s) => symbol_to_doc(alloc, *s),
TagName::Closure(s) => alloc
.text("ClosureTag(")
.append(symbol_to_doc(alloc, *s))
.append(")"),
};
let it = arguments.iter().map(|s| symbol_to_doc(alloc, *s));
@ -1006,7 +1009,10 @@ impl<'a> Expr<'a> {
let doc_tag = match tag_name {
TagName::Global(s) => alloc.text(s.as_str()),
TagName::Private(s) => alloc.text(format!("{}", s)),
TagName::Closure(s) => alloc.text(format!("Closure({})", s)),
TagName::Closure(s) => alloc
.text("ClosureTag(")
.append(symbol_to_doc(alloc, *s))
.append(")"),
};
let it = arguments.iter().map(|s| symbol_to_doc(alloc, *s));