mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
fix issue with one-element records containing a union in the closure argument
This commit is contained in:
parent
1930a27b24
commit
fc85761783
4 changed files with 32 additions and 14 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue