mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
add whole_var to tag union/record
the existing var is for the extension (ext_var). during mono we need the whole type to look up the layout, so store that as well
This commit is contained in:
parent
129be86233
commit
2e697ee8f9
2 changed files with 47 additions and 19 deletions
|
@ -662,13 +662,13 @@ fn pattern_to_vars_by_symbol(
|
|||
vars_by_symbol.insert(symbol.clone(), expr_var);
|
||||
}
|
||||
|
||||
AppliedTag(_, _, arguments) => {
|
||||
AppliedTag { arguments, .. } => {
|
||||
for (var, nested) in arguments {
|
||||
pattern_to_vars_by_symbol(vars_by_symbol, &nested.value, *var);
|
||||
}
|
||||
}
|
||||
|
||||
RecordDestructure(_, destructs) => {
|
||||
RecordDestructure { destructs, .. } => {
|
||||
for destruct in destructs {
|
||||
vars_by_symbol.insert(destruct.value.symbol.clone(), destruct.value.var);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue