fix nonlocal crashes
authorStefan Behnel <scoder@users.berlios.de>
Thu, 7 Apr 2011 13:30:07 +0000 (15:30 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Thu, 7 Apr 2011 13:30:07 +0000 (15:30 +0200)
Cython/Compiler/TypeInference.py

index a0870c7657bd28502d52a43d5f9d38ae2d033e7e..3ff3daf76130ad3ee745cfdbf1470b3f0595086e 100644 (file)
@@ -239,7 +239,7 @@ class SimpleAssignmentTypeInferer(object):
         ready_to_infer = []
         for name, entry in scope.entries.items():
             if entry.type is unspecified_type:
-                if entry.in_closure:
+                if entry.in_closure or entry.from_closure:
                     # cross-closure type inference is not currently supported
                     entry.type = py_object_type
                     continue