Commit cc452cb6 authored by Stefan Behnel's avatar Stefan Behnel

looks like the declaration analysis phase is too early for building type...

looks like the declaration analysis phase is too early for building type conversion utility code - do it during type analysis
parent 7621f44f
...@@ -2634,6 +2634,8 @@ class DefNode(FuncDefNode): ...@@ -2634,6 +2634,8 @@ class DefNode(FuncDefNode):
for decorator in self.decorators[::-1]: for decorator in self.decorators[::-1]:
decorator.decorator.analyse_expressions(env) decorator.decorator.analyse_expressions(env)
self.py_wrapper.prepare_argument_coercion(env)
def needs_assignment_synthesis(self, env, code=None): def needs_assignment_synthesis(self, env, code=None):
if self.is_wrapper or self.specialized_cpdefs or self.entry.is_fused_specialized: if self.is_wrapper or self.specialized_cpdefs or self.entry.is_fused_specialized:
return False return False
...@@ -2758,6 +2760,7 @@ class DefNodeWrapper(FuncDefNode): ...@@ -2758,6 +2760,7 @@ class DefNodeWrapper(FuncDefNode):
self.signature = target_entry.signature self.signature = target_entry.signature
def prepare_argument_coercion(self, env):
# This is only really required for Cython utility code at this time, # This is only really required for Cython utility code at this time,
# everything else can be done during code generation. But we expand # everything else can be done during code generation. But we expand
# all utility code here, simply because we cannot easily distinguish # all utility code here, simply because we cannot easily distinguish
......
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