mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 14:54:47 +00:00
write implementation
This commit is contained in:
parent
aba01ad62a
commit
5e1077bf3e
2 changed files with 107 additions and 6 deletions
|
@ -1361,8 +1361,13 @@ impl<'a> Expr<'a> {
|
|||
.text("GetTagId ")
|
||||
.append(symbol_to_doc(alloc, *structure)),
|
||||
|
||||
CoerceToTagId { tag_id, structure } => alloc
|
||||
.text(format!("CoerceToTagId {} ", tag_id))
|
||||
CoerceToTagId {
|
||||
tag_id,
|
||||
structure,
|
||||
index,
|
||||
..
|
||||
} => alloc
|
||||
.text(format!("CoerceToTagId (Id {}) (Index {}) ", tag_id, index))
|
||||
.append(symbol_to_doc(alloc, *structure)),
|
||||
}
|
||||
}
|
||||
|
@ -5546,10 +5551,12 @@ fn substitute_in_expr<'a>(
|
|||
None => None,
|
||||
},
|
||||
|
||||
CoerceToTagId { structure, tag_id } => match substitute(subs, *structure) {
|
||||
CoerceToTagId { structure, tag_id, index, union_layout } => match substitute(subs, *structure) {
|
||||
Some(structure) => Some(CoerceToTagId {
|
||||
structure,
|
||||
tag_id: *tag_id,
|
||||
index: *index,
|
||||
union_layout: *union_layout,
|
||||
}),
|
||||
None => None,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue