Commit ece46608 authored by Stefan Behnel's avatar Stefan Behnel

fix unknown name error

parent 288ebda9
...@@ -953,8 +953,10 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations): ...@@ -953,8 +953,10 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
if name == 'locals': if name == 'locals':
node.directive_locals = value node.directive_locals = value
elif name != 'final': elif name != 'final':
self.context.nonfatal_error(PostParseError(dec.pos, self.context.nonfatal_error(PostParseError(
"Cdef functions can only take cython.locals() or final decorators, got %s." % name)) node.pos,
"Cdef functions can only take cython.locals() "
"or final decorators, got %s." % name))
body = Nodes.StatListNode(node.pos, stats=[node]) body = Nodes.StatListNode(node.pos, stats=[node])
return self.visit_with_directives(body, directives) return self.visit_with_directives(body, directives)
......
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