mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Correct what destructures are exhaustive
This commit is contained in:
parent
4f48873178
commit
f0b017b807
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ impl Pattern {
|
|||
RecordDestructure { destructs, .. } => {
|
||||
// If all destructs are surely exhaustive, then this is surely exhaustive.
|
||||
destructs.iter().all(|d| match &d.value.typ {
|
||||
DestructType::Required | DestructType::Optional(_, _) => false,
|
||||
DestructType::Required | DestructType::Optional(_, _) => true,
|
||||
DestructType::Guard(_, pat) => pat.value.surely_exhaustive(),
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue