properly assign target type to new IntNode on coercion
authorStefan Behnel <scoder@users.berlios.de>
Fri, 12 Nov 2010 22:34:59 +0000 (23:34 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 12 Nov 2010 22:34:59 +0000 (23:34 +0100)
Cython/Compiler/ExprNodes.py

index 6bf24f94e5aeb90fad174f161ea7b5e2e3568c39..0358604c8d3e5954beafbddc7eef549ddecabebe 100755 (executable)
@@ -845,7 +845,7 @@ class IntNode(ConstNode):
                 return FloatNode(self.pos, value=self.value, type=dst_type,
                                  constant_result=not_a_constant)
         node = IntNode(self.pos, value=self.value, constant_result=self.constant_result,
-                       unsigned=self.unsigned, longness=self.longness)
+                       type = dst_type, unsigned=self.unsigned, longness=self.longness)
         if dst_type.is_numeric and not dst_type.is_complex:
             return node
         if dst_type.is_pyobject: