mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
fixing tests
This commit is contained in:
parent
01f9539d8e
commit
f48a661b3d
3 changed files with 9 additions and 7 deletions
|
@ -77,7 +77,12 @@ pub fn symbols_from_pattern_help(pattern: &Pattern, symbols: &mut Vec<Symbol>) {
|
|||
}
|
||||
RecordDestructure { destructs, .. } => {
|
||||
for destruct in destructs {
|
||||
symbols.push(destruct.value.symbol);
|
||||
// when a record field has a pattern guard, only symbols in the guard are introduced
|
||||
if let DestructType::Guard(_, subpattern) = &destruct.value.typ {
|
||||
symbols_from_pattern_help(&subpattern.value, symbols);
|
||||
} else {
|
||||
symbols.push(destruct.value.symbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue