fix unknown name error
authorStefan Behnel <stefan_ml@behnel.de>
Sat, 27 Jul 2013 16:51:18 +0000 (18:51 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Sat, 27 Jul 2013 16:51:18 +0000 (18:51 +0200)
Cython/Compiler/ParseTreeTransforms.py

index 43fe2d0..bddd461 100644 (file)
@@ -953,8 +953,10 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
             if name == 'locals':
                 node.directive_locals = value
             elif name != 'final':
-                self.context.nonfatal_error(PostParseError(dec.pos,
-                    "Cdef functions can only take cython.locals() or final decorators, got %s." % name))
+                self.context.nonfatal_error(PostParseError(
+                    node.pos,
+                    "Cdef functions can only take cython.locals() "
+                    "or final decorators, got %s." % name))
         body = Nodes.StatListNode(node.pos, stats=[node])
         return self.visit_with_directives(body, directives)