Fix typo in bounds checking "x - y".

This commit is contained in:
Nigel Tao committed 2017-06-02 11:07:29 +10:00
1 parent 5a0aea66a3
commit d276ed52f4
1 file changed
+1 -1
+1 -1
View File
@@ -503,7 +503,7 @@ func (q *checker) bcheckExprBinaryOp(lhs *a.Expr, op t.Key, rhs *a.Expr, depth u
case t.KeyXBinaryPlus:
return big.NewInt(0).Add(lMin, rMin), big.NewInt(0).Add(lMax, rMax), nil
case t.KeyXBinaryMinus:
return big.NewInt(0).Sub(lMin, rMin), big.NewInt(0).Sub(lMax, rMax), nil
return big.NewInt(0).Sub(lMin, rMax), big.NewInt(0).Sub(lMax, rMin), nil
case t.KeyXBinaryStar:
// TODO.
if cv := lhs.ConstValue(); cv != nil && cv.Cmp(zero) == 0 {