Introduce finer-grained effects

This commit is contained in:
Nigel Tao committed 2018-07-29 13:40:49 +10:00
1 parent 77e538aec8
commit 0a47966e72
12 files changed
+129 -115

No files matched your search

+1 -1
View File
@@ -382,7 +382,7 @@ func (q *checker) bcheckAssignment(lhs *a.Expr, op t.ID, rhs *a.Expr) error {
return err
}
if lhs.Pure() && rhs.Pure() && lhs.MType().IsNumType() {
if lhs.Effect().Pure() && rhs.Effect().Pure() && lhs.MType().IsNumType() {
o := a.NewExpr(0, t.IDXBinaryEqEq, 0, 0, lhs.AsNode(), nil, rhs.AsNode(), nil)
o.SetMType(lhs.MType())
q.facts.appendFact(o)