Commit 33784d77 authored by Robert Bradshaw's avatar Robert Bradshaw

Propagate directives in analysis phase.

parent e46bfff2
...@@ -1398,6 +1398,7 @@ class CFuncDefNode(FuncDefNode): ...@@ -1398,6 +1398,7 @@ class CFuncDefNode(FuncDefNode):
return with_gil return with_gil
def analyse_expressions(self, env): def analyse_expressions(self, env):
self.local_scope.directives = env.directives
self.analyse_default_values(env) self.analyse_default_values(env)
if self.py_func is not None: if self.py_func is not None:
self.py_func.analyse_expressions(env) self.py_func.analyse_expressions(env)
...@@ -1824,6 +1825,7 @@ class DefNode(FuncDefNode): ...@@ -1824,6 +1825,7 @@ class DefNode(FuncDefNode):
env.control_flow.set_state((), (arg.name, 'initalized'), True) env.control_flow.set_state((), (arg.name, 'initalized'), True)
def analyse_expressions(self, env): def analyse_expressions(self, env):
self.local_scope.directives = env.directives
self.analyse_default_values(env) self.analyse_default_values(env)
if env.is_py_class_scope: if env.is_py_class_scope:
self.synthesize_assignment_node(env) self.synthesize_assignment_node(env)
......
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