fix scope of closures that was missing a 'directives' dict, explicitly mark closure...
authorStefan Behnel <scoder@users.berlios.de>
Sat, 30 Oct 2010 17:54:35 +0000 (19:54 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 30 Oct 2010 17:54:35 +0000 (19:54 +0200)
Cython/Compiler/ParseTreeTransforms.py

index 8098828a2302d4a4b299f5b06ce706caf48ba577..e04b28bfc186fb0e1a5ddae678160c11304e0741 100644 (file)
@@ -1293,6 +1293,7 @@ class CreateClosureClasses(CythonTransform):
         func_scope.scope_class = entry
         class_scope = entry.type.scope
         class_scope.is_internal = True
+        class_scope.directives = {'final': True}
         if node.entry.scope.is_closure_scope:
             class_scope.declare_var(pos=node.pos,
                                     name=Naming.outer_scope_cname, # this could conflict?