Commit 4ef3dcb6 authored by Stefan Behnel's avatar Stefan Behnel

fix scope of closures that was missing a 'directives' dict, explicitly mark closure classes 'final'

parent 3fcfc62d
......@@ -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?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment