Commit a96a885b authored by Marius Wachtler's avatar Marius Wachtler Committed by Kevin Modzelewski

Fix chained comparions: remove redundant comparisons

parent 21ebad60
......@@ -518,7 +518,7 @@ private:
push_back(makeAssign(name, val));
AST_Branch* br = new AST_Branch();
br->test = val;
br->test = makeName(name, AST_TYPE::Load);
push_back(br);
CFGBlock* was_block = curblock;
......
# expected: fail
class C(object):
def __init__(self, n):
self.n = n
......@@ -17,4 +15,5 @@ def f(n):
return C(n)
# f(3) shouldn't get called:
f(1) <= f(2) < f(1) < f(3)
print f(1) <= f(2) < f(1) < f(3)
print f(5) > f(3) < f(4) < f(5)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment