fix copy+paste bug
authorStefan Behnel <scoder@users.berlios.de>
Tue, 15 Sep 2009 09:12:31 +0000 (11:12 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 15 Sep 2009 09:12:31 +0000 (11:12 +0200)
Cython/Compiler/Optimize.py

index 4c30119632bb014c96990efe8cd76e262353dbc4..71b0eeda4910637e28f62ca67cf178f80fe3c3d4 100644 (file)
@@ -1008,7 +1008,7 @@ class ConstantFolding(Visitor.VisitorTransform, SkipDeclarations):
             # constant node to prevent any loss of precision.
             return node
         if not isinstance(node.operand1, ExprNodes.ConstNode) or \
-               not isinstance(node.operand1, ExprNodes.ConstNode):
+               not isinstance(node.operand2, ExprNodes.ConstNode):
             # We calculate other constants to make them available to
             # the compiler, but we only aggregate constant nodes
             # recursively, so non-const nodes are straight out.