#581 - bad reference type coercion
authorRobert Bradshaw <robertwb@math.washington.edu>
Tue, 5 Oct 2010 03:53:08 +0000 (20:53 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Tue, 5 Oct 2010 03:53:08 +0000 (20:53 -0700)
Cython/Compiler/ExprNodes.py

index a21254a8aa50c168667150aec8cb4e55c1795b10..950c0df32691fab739a13498aa921752a561cad9 100755 (executable)
@@ -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: