fix edge case with assign and pattern matching

This commit is contained in:
microproofs
2023-07-29 15:28:22 -04:00
committed by Kasey
parent 186e1235fd
commit 80b950b8aa

View File

@@ -622,7 +622,8 @@ pub fn pattern_has_conditions(pattern: &TypedPattern) -> bool {
} => arguments
.iter()
.any(|arg| pattern_has_conditions(&arg.value)),
Pattern::Var { .. } | Pattern::Discard { .. } | Pattern::Assign { .. } => false,
Pattern::Assign { pattern, .. } => pattern_has_conditions(pattern),
Pattern::Var { .. } | Pattern::Discard { .. } => false,
}
}