From: Stefan Behnel Date: Sat, 30 Oct 2010 17:54:35 +0000 (+0200) Subject: fix scope of closures that was missing a 'directives' dict, explicitly mark closure... X-Git-Tag: 0.14.alpha0~278 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4ef3dcb642b07a757d5768c2732963bca8c19870;p=cython.git fix scope of closures that was missing a 'directives' dict, explicitly mark closure classes 'final' --- diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 8098828a..e04b28bf 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -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?