Commit 1ca9b8dc authored by Stefan Behnel's avatar Stefan Behnel

minor code simplification

parent 621b6d11
...@@ -2006,10 +2006,9 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin, ...@@ -2006,10 +2006,9 @@ class OptimizeBuiltinCalls(Visitor.NodeRefCleanupMixin,
arg = node.arg arg = node.arg
if not arg.type.is_pyobject: if not arg.type.is_pyobject:
# no Python conversion left at all, just do a C coercion instead # no Python conversion left at all, just do a C coercion instead
if node.type == arg.type: if node.type != arg.type:
return arg arg = arg.coerce_to(node.type, self.current_env())
else: return arg
return arg.coerce_to(node.type, self.current_env())
if isinstance(arg, ExprNodes.PyTypeTestNode): if isinstance(arg, ExprNodes.PyTypeTestNode):
arg = arg.arg arg = arg.arg
if arg.is_literal: if arg.is_literal:
......
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