summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2014-10-10 23:28:59 +0200
committerStefan Behnel <stefan_ml@behnel.de>2014-10-10 23:28:59 +0200
commit19f1477f01dfca93c1b188686302d3595cdf1151 (patch)
tree1adc7a31a0bf31afb6e36351a5a068618b3bb678
parent98b0f5dbda72b0861362e5a0e904ed55ae11d7ee (diff)
downloadcython-19f1477f01dfca93c1b188686302d3595cdf1151.tar.gz
analyse argument annotations as types really only when annotation_typing=True
--HG-- extra : transplant_source : %B2a%A7%A9%A6%2A%2C%21%11%A1%D3%A0%F4%0D%D1%C7K%97%60_
-rw-r--r--Cython/Compiler/Nodes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py
index b9748108b..81c5bf50d 100644
--- a/Cython/Compiler/Nodes.py
+++ b/Cython/Compiler/Nodes.py
@@ -1583,7 +1583,7 @@ class FuncDefNode(StatNode, BlockNode):
if arg.name in directive_locals:
type_node = directive_locals[arg.name]
other_type = type_node.analyse_as_type(env)
- elif isinstance(arg, CArgDeclNode) and arg.annotation:
+ elif isinstance(arg, CArgDeclNode) and arg.annotation and env.directives['annotation_typing']:
type_node = arg.annotation
other_type = arg.inject_type_from_annotations(env)
if other_type is None: