Commit 2386a30e authored by sizeoftank's avatar sizeoftank

Fix extra nonzero call for chained comparisons #1190

parent 2e780773
......@@ -942,7 +942,10 @@ private:
pushAssign(name, val);
// TODO: this branch is unused for the last comparison
if (i == node->ops.size() - 1) {
continue;
}
AST_Branch* br = new AST_Branch();
br->test = callNonzero(makeLoad(name, node));
push_back(br);
......
# expected: fail
# - we have an extra evaluation of __nonzero__ at the end
class A(object):
......
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