fix overeager detection of (->)/2 in if position of (;)/2 (#2183)
This commit is contained in:
@@ -663,12 +663,16 @@ impl VariableClassifier {
|
|||||||
state_stack.last(),
|
state_stack.last(),
|
||||||
Some(TraversalState::RemoveBranchNum)
|
Some(TraversalState::RemoveBranchNum)
|
||||||
) {
|
) {
|
||||||
// check if the second-to-last element is a regular BuildDisjunct, as we don't
|
// check if the second-to-last element
|
||||||
// want to add GetPrevLevel in case of a TrustMe.
|
// is a regular BuildDisjunct, as we
|
||||||
matches!(
|
// don't want to add GetPrevLevel in
|
||||||
state_stack.iter().rev().nth(1),
|
// case of a TrustMe.
|
||||||
Some(TraversalState::BuildDisjunct(..))
|
match state_stack.iter().rev().nth(1) {
|
||||||
)
|
Some(&TraversalState::BuildDisjunct(preceding_len)) => {
|
||||||
|
preceding_len + 1 == build_stack.len()
|
||||||
|
}
|
||||||
|
_ => false,
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
false
|
false
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user