Do not treat Expr::Index with pure index as pure.
This commit is contained in:
@@ -1899,9 +1899,7 @@ impl Expr {
|
||||
|
||||
Self::Map(x, _) => x.0.iter().map(|(_, v)| v).all(Self::is_pure),
|
||||
|
||||
Self::Index(x, _) | Self::And(x, _) | Self::Or(x, _) => {
|
||||
x.lhs.is_pure() && x.rhs.is_pure()
|
||||
}
|
||||
Self::And(x, _) | Self::Or(x, _) => x.lhs.is_pure() && x.rhs.is_pure(),
|
||||
|
||||
Self::Stmt(x) => x.0.iter().all(Stmt::is_pure),
|
||||
|
||||
|
Reference in New Issue
Block a user