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

Need to delay annotation typing after the "as_cfunction()" conversion in...

Need to delay annotation typing after the "as_cfunction()" conversion in AdjustDefByDirectives transform as we do not have an 'env' yet.
parent 2a160845
...@@ -867,8 +867,8 @@ class CArgDeclNode(Node): ...@@ -867,8 +867,8 @@ class CArgDeclNode(Node):
base_type = base_type.base_type base_type = base_type.base_type
# inject type declaration from annotations # inject type declaration from annotations
# FIXME: this is called without 'env' by AdjustDefByDirectives transform before declaration analysis # this is called without 'env' by AdjustDefByDirectives transform before declaration analysis
if self.annotation and (not env or env.directives['annotation_typing']) and self.base_type.name is None: if self.annotation and env and env.directives['annotation_typing'] and self.base_type.name is None:
arg_type = self.inject_type_from_annotations(env) arg_type = self.inject_type_from_annotations(env)
if arg_type is not None: if arg_type is not None:
base_type = arg_type base_type = arg_type
......
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