From 464923673475879fedc103ef2ee0260ba88d1493 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Mon, 4 Oct 2010 20:53:08 -0700 Subject: [PATCH] #581 - bad reference type coercion --- Cython/Compiler/ExprNodes.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- 2.26.2