fix edge case with assign and pattern matching
This commit is contained in:
parent
186e1235fd
commit
80b950b8aa
|
@ -622,7 +622,8 @@ pub fn pattern_has_conditions(pattern: &TypedPattern) -> bool {
|
||||||
} => arguments
|
} => arguments
|
||||||
.iter()
|
.iter()
|
||||||
.any(|arg| pattern_has_conditions(&arg.value)),
|
.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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue