be a little more conservative in the last change
authorStefan Behnel <scoder@users.berlios.de>
Mon, 4 May 2009 15:47:57 +0000 (17:47 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 4 May 2009 15:47:57 +0000 (17:47 +0200)
Cython/Compiler/ExprNodes.py

index f248af97e56eb85467e298d3ba9ca20567ba91ba..5b61722406b37a4c7a569ae6713e06d7b677a7dc 100644 (file)
@@ -2002,7 +2002,8 @@ class SliceIndexNode(ExprNode):
     def analyse_target_types(self, env):
         self.analyse_types(env)
         # when assigning, we must accept any Python type
-        self.type = py_object_type
+        if self.type.is_pyobject:
+            self.type = py_object_type
 
     def analyse_types(self, env):
         self.base.analyse_types(env)