From: Robert Bradshaw Date: Tue, 5 Oct 2010 03:53:08 +0000 (-0700) Subject: #581 - bad reference type coercion X-Git-Tag: 0.14.alpha0~301 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=464923673475879fedc103ef2ee0260ba88d1493;p=cython.git #581 - bad reference type coercion --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index a21254a8..950c0df3 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -559,6 +559,9 @@ class ExprNode(Node): if self.check_for_coercion_error(dst_type): return self + if dst_type.is_reference: + dst_type = dst_type.ref_base_type + if dst_type.is_pyobject: if not src.type.is_pyobject: if dst_type is bytes_type and src.type.is_int: